How Does A View Over A Link Server Work?
Sep 21, 2007
Hallo
I got a Link Server (IBMDASQL) and a view. And I am wondering how a view works.
If I try:
select * from [myView] where [myView].A = @A
Dos the Link Server retrieve the complete table and the SQL server applies the where condition?
Or
Does the Link Server use the where condition and retrieve just the requested records?
View 6 Replies
ADVERTISEMENT
Apr 24, 2006
I have a query that joins with different table using link server in the database. SSSI doesn€™t take the query. How to make the SSIS package query to use the link server in the data base ?
thanks
View 2 Replies
View Related
May 19, 2008
Hi.
I have a problem.
I do a basic report with just one simple table:
_id
_name
_comment
_file
I'm able to get all informations into a table. But for the file, I created a URL Link for this file.
But when the reporting is generating in html, if I click on the file's link, nothing happens. But I can dowload the file with a right click. And if I see proprieties of the link, the link is rights, and it's works good if I copy and paste it on the IE url bar.
So for summary, my problem is : nothing happens if I click on the file, but a want a window's opening with the choose "Open with" or "Save on the disk".
Somebody can help me?
Thanks
View 1 Replies
View Related
Jan 7, 2007
Environment:Server1 (Local)OS Windows 2000 ServerSQL Server 2000Server2 (Remote)OS Windows 2003 ServerSQL Server 2000(Both with most recent service packs)Using Enterprise Manager, we have set up the Link Server (LINK_A) inthe Local Server 1 to connect to Server 2.The SQL we need to run is the following:INSERT INTO table1(column1,column2)SELECT A.column1, A.column2FROM LINK_A.catalog_name.dbo.table2 AS AWHERE A.column1 xxxx;When we run this from the Query Analyzer, it completes with no problemsin a few seconds.Our problem:When we add the DTS Package as the ActiveX Script (VB Script) to theLocal Package, it times out at "obj_Conn.Execute str_Sql"Dim Sql, obj_ConnSet obj_Conn = CreateObject("ADODB.Connection")obj_Conn.Open XXXXobj_Conn.BeginTransstr_Sql = "INSERT INTO table1("str_Sql = str_Sql & "column1"str_Sql = str_Sql & ", column2"str_Sql = str_Sql & ")"str_Sql = str_Sql & " SELECT A.column1"str_Sql = str_Sql & ", A.column2"str_Sql = str_Sql & " FROM LINK_A.catalog_name.dbo.table2 AS A"str_Sql = str_Sql & " WHERE A.column1 0"str_Sql = str_Sql & ";"obj_Conn.Execute str_Sql----------------------------------------------------------When we make a Stored Procedure and run the following SQL, it freezes.INSERT INTO table1(column1,column2)SELECT A.column1, A.column2FROM LINK_A.catalog_name.dbo.table2 AS AWHERE A.column1 xxxxWe've also tried the following with the same results;INSERT INTO table1(column1,column2)SELECT A.column1, A.column2FROM [LINK_A].[catalog_name].[dbo].[table2] AS AWHERE A.column1 xxxxThe same thing happens when we try to run the "SELECT" by itself.SELECT TOP 1 @test=A.column1FROM LINK_A.catalog_name.dbo.table2 AS AWHERE A.column1 xxxxORDER BY A.column1What is going wrong here, and how do we need to change this so that itruns without timing out or freezing?
View 2 Replies
View Related
Apr 4, 2015
Consider following code:
SELECT e1.EntityIdentity as CompanyID
FROM dbo.Entitye1 --company
JOIN dbo.EntityAssociationea
ON e1.EntityID = ea.EntityID1
JOIN dbo.Entitye2 --user
ON ea.EntityID2 = e2.EntityID
This query occurs as a sub-query in many stored procedures where exists a WHERE clause that includes CompanyID IN (above query).
Since dbo.Entity and dbo.EntityAssociation change infrequently I thought that an indexed view would really improve performance. But I've found one of the seemingly undocumented Microsoft features when trying to create the clustered index and get the following error msg:
Msg 1947, Level 16, State 1, Line 1
Cannot create index on view "ROICore.dbo.vEntityEntityAssociation_CompanyUser". The view contains a self join on "ROICore.dbo.Entity".
I really need to improve performance on this subquery. Entity currently has over 20m rows and EntityAssociation over 35m rows and both are growing.
How to improve performance? Indexes on both tables for the most part give index seeks, but I thought my saviour might be the index view. Obviously this will not work.
View 3 Replies
View Related
Mar 11, 2008
Hi folk..
can some body help me with this problem..???
I have a grid view on a form which has got colums which are set as data combo boxes. and a third column whish is set to a text box. all the 3 controls on the datagrid view are bound with sql server table.
they are asociated with two saparate tables within 1 database...
now what i want is that the user of the application can select either combo box 1 of teh 2nd combo box.
and automatically the syncronize and also the text column asociates with related data..
for example
Country City Pincode
India vasco 403802
now while flling the grid vew.. the user can select either country or city.. automatically
both syncronize with related data and so does the text box.
plz help me with the code.. as well..
thanks a million
View 1 Replies
View Related
Mar 16, 2015
I am using BCP utility to export data from a view to text file. I get the following error
"Copy direction must be either r 'in', 'out' ..." when I execute the following
exec master..xp_cmdshell 'bcp [Salesforce_Prod].[dbo].[Project With Opps] out c: est99.txt -c -t, -T -S'
The same thing work if I replace the view in the statement above with a table name.
View 3 Replies
View Related
May 1, 2006
I created a view V1 that uses an outer join with a table and calls a sub-view VS1 (ds_proj_report_date) which uses an inner join) and does an inner join with VS1. I also created another view V2 that uses inner join but does not call the sub-view VS1.
When I run the two views as below it works fine
Select * from V1
Union
Select * from V2
I then created another view V3 of the above union as
Create view V3
As
Select * from V1
Union
Select * from V2
Now when I run select * from V3, I get the following error.
Joined tables cannot be specified in a query containing outer join operators. View or function 'ds_proj_report_date' contains joined tables
View 1 Replies
View Related
Jul 11, 2007
hi guys,
i've been asked to re-write a sql view. the view itself contains several calls to other views (embedded). is there a way to get around using embedded views. I've written the same query up using temp. tables but obviously temp. tables can't be used in views?
Is there any special things I should be looking for?
View 2 Replies
View Related
Mar 17, 2007
My Table Structure
Category_ID Number
Parent_ID Number <----Category_ID reports to this colum
Category_Name Varchar....
MY QUERY <---I replaced the query above with my data
=============================
WITH Hierarchy(Category_ID, Category_Name, Parent_ID, HLevel)
AS
(
SELECT Category_ID, Category_Name, Parent_ID, 0 as HLevel FROM Dir_Categories
UNION ALL
SELECT SubCategory.Category_ID
, SubCategory.Category_Name,
SubCategory.Parent_ID,
HLevel + 1
FROM Dir_Categories SubCategory
INNER JOIN Hierarchy ParentCategory
ON SubCategory.Parent_ID = ParentCategory.Category_ID )
SELECT Category_ID,
Category_Name = Replicate('__', HLevel) + Category_Name,
Parent_ID,
HLevel
FROM Hierarchy
My OUTPUT============
All the categories under reporting to Parent_ID 0 or continuous, then the ones reporting to 1 and so fourth. Subcategories are not showing within their main categories. I AM GOING NUTS WITH THIS.
Can you help me please?
View 12 Replies
View Related
Jul 12, 2007
Hi guys,I've been asked to re-write a sql view. The view itself containsseveral calls to other views (embedded). Is there a way to get aroundusing embedded views. I've written the same query up using temp.tables but obviously temp. tables can't be used in views?Is there any special things I should be looking for?
View 2 Replies
View Related
Dec 13, 2005
This works fine in SQL 2000, but not in SQL 2005
View 12 Replies
View Related
Nov 28, 2006
Hi
I have been asked to move our entire system over from SQL2000 to SQL2005, i eventually got our database and Cubes over to 2005 and converted all my reports to 2005 and deployed them successfully on RS2005
All the subscriptions have been made and they seem to work when i click to view them. Although when i create a DDS for all my reports to run then they fail. Now i've got over 5000 reports to build and i'm definately not going to create each report manually. My SQL Reports huild successfully, it just seems to be the MDX Reports with a problem, i;ve checked my stored procs and they seem fine, i've even seen the [Clients].&[All.Clients] difference from SQL2005 ---->&<------ that is not in SQL2000.
If someone has, or has had the same problem before would you please help me. Any advice or suggestions would be more than welcome.
Kind Regards
Eagle
View 1 Replies
View Related
Nov 12, 2007
Good morning all,
I have searched everywhere for this and I can't find any information on it. When I use the Query Builder, in the top pane, the Filter pane, there are five columnsimension, Hierarchy, Operator, Filter Expession and Parameters.
In the dropdown for Operator, one of the choices is MDX. I cannot find any documentation on how to use this operator. I want to limit my filter to SELF_AND_AFTER, and I am hoping that this is possible using this operator. I know how to hand code it, but I have a ton of other tweaks to make to the query, so I want to use the Query Designer as much as I can.
Does anyone have any links to documentation on how to use this operator?
Thanks,
Kathryn
View 2 Replies
View Related
Feb 20, 2008
I have created an Access2003 project (existing data) that links to external data. First I connected to a SQL Server 2000 database. Success. Then I tried to set up a Transact SQL data connection to a legacy MDW-secured Access97 database. (A third-party VB6 application goes against it, and we don't have the source code, so we cannot upgrade it.)
The Transact SQL link tests OK but I cannot select any of the tables or queries from the list presented. However, with the same credentials, I can use these same objects in Excel 2003.
When setting up the link in Access2003, I specify JET 4.0 OLE DB Provider, I enter the MDW file on the All tab, a username and a password on the Connection tab where I browse to the MDB file, and specify Shared Deny None on the Advanced tab. When I test the connection, it tests OK ("Test connection succeeded"). Yet on the "Select the Database and Table/Cube which contains the data you want" dialog, "(Default)" appears in the grayed-out dropdown. Then, beneath that dropdown, there is a grid with Name and Description columns. The grid contains query names but the grid is not enabled. The list of queries is this table is grayed out. Neither of the scrollbars works.
BUT... if I use the SAME username and password in Excel2003, and specify the same MDW, there is no problem working with these same database objects in the legacy Access97 database. WHAT IS DIFFERENT ABOUT THE WIZARD IN EXCEL THAT ALLOWS IT TO SUCCEED AND THE WIZARD IN ACCESS THAT CAUSES IT TO FAIL HERE? In Excel, the list of available providers says Microsoft Access Driver, not JET 4.0 OLE DB Provider.
Thanks
TR
View 1 Replies
View Related
Feb 3, 2006
When trying to link to an SQL table in Access 2003, the software appears to be malfunctioning.
The sequence of events is File - Get External Data - Link Tables - Files of Type: ODBC Databases().
The Problem: On two of my computers, the select data source window does not pop up, preventing me from linking to any ODBC data source.
Observations: This function has worked normally in the recent past and works on other computers running Access 2003. One difference between the computers working and non-working computers is Norton Antivirus 2006 (recent upgrade).
Has anyone experienced anything like this? What's going on?
View 8 Replies
View Related
Oct 9, 2007
Hi,
It appears to work fine on my end however on my clients end, whenever they try to print a report that displays perfectly within the report viewer to their printer by selecting the printer button in the report it never ends up printing.., however if they go into printer setup and change the page range to print from all pages to just maybe one page and then select the print button it seems to print fine..
The printer seems to receive the information as the light flashes but no page kick out when all pages is selected to print..
Any help would be greatly appreciated..
View 1 Replies
View Related
May 4, 2000
Can any one tell me what I did wrong? Tried to set up link server from SQL 7.0 to Oracle.I did it as it was instruct in BOL. When I tried to click on the table, I got this message "error 7399: OLE DB provider "MSDAORA" reported error. Thanks.
View 1 Replies
View Related
Sep 18, 2001
I have created a linked server using an userid that have access to 2 different databases. The linked
was created successfully but I am only able to see tables in 1 database but not both.
The tables of the databases that I can access is the default database of that userid. Is there a way to see all the
tables from more than 1 database that the user is authorized to? Thanks.
View 2 Replies
View Related
Mar 4, 2008
I need help on creating Link Servers. The error message that I get says the link server is been created but it fails to connect.
View 2 Replies
View Related
Oct 17, 2007
Error 7302: Could not create an instance of OLE DB provider 'SQLOLEDB'. OLE DB error trace [Non-interface error: CoCreate of DSO for SQLOLEDB returned x8007007f].
CASE:
I created a link server from SQL Server 2000 to FoxPro database using vfpoledb driver. SQL server and FoxPro database are NOT being run on the same machine.
Server1 - SQL Server 2000 (I created the link server which connects to Server2)
Server2 - FoxPro database
TROUBLESHOOT
When I test the link server on the machine which has FoxPro database , It is working with no problem.
PROBLEM STATEMENT:
When a user machine sends a query to Server1/Link Server, it is getting Error:7302
Please help me.
View 2 Replies
View Related
Jul 20, 2005
Sql Server 7 Standard EditionMy Server was renamed and the normal steps of reinstallingand running sp_dropserver and sp_addserver were followed.Everything seems to work fine but jobs from the master server.I did defect the server as a target server since it appeared as offlineanyway.On trying to re establish the status of the server as a target serverFailed to make "serverName" a target serverEnlist into Master Server "MasterServerName" Failed(Error 14262)Your insight is appreciatedVincento
View 3 Replies
View Related
Feb 11, 2008
hello. I have a windows 2003 server with sql server 2000 and a public IP address and domain name
when i am on the same network as the server I can link to the sql server with just the dowmain name www.omghelp.com
but when I take that same access adp file or mdb file home it says "database can not be found "
what do i need to get it to work...help please
View 2 Replies
View Related
Apr 10, 2008
Hi,
I have two database one on local system and another on web both are in MS SQL 2005 Now I want to link both of them by using Link server but the System procedure ask of oledb I am not understanding what to do.
I searched the web but .....
So plz tell me some link or code ........
thanks
View 1 Replies
View Related
Mar 11, 2005
Is it possible to link MSDE to another server through ODBC? I want to do this like you can in Access, where you get external data by linking tables. Any ideas? Thanks!
View 1 Replies
View Related
Jul 25, 2001
Hi,
When ever I trying to run a select statement from one server to a linked server (remote server), like:
select * from servername.dbname.owner.table
It fails saying there are too many prefixes. Only 2 are allowed and there are three above.
Any one knows what's the issue here.
Thanks
View 2 Replies
View Related
Oct 6, 2006
Hi,
I am considdering to link a Informix database (running on SCO Unix) to a SQL Server 2005. Only problem is ... I have no idea how to do this! The reason I'm attempring this is to try and see if it would fix a problem I'm experiencing when using Reporting Services to generate reports from a Informix data source. I've been told that setting up a linked server might fix the problem. If anyone could perhabs guide me through setting up the linked server I would be very grateful! The ODBC credentials for setting up a connection to the Informix DB as follows:
Servername : pal_tli
Hostname : server_name
Service : pal_ser
Protocal : sesoctcp
Database : db_name
Username : user_name
Password : pword
:confused:
View 1 Replies
View Related
Oct 10, 2007
Hi all,
I am having two databases(MS-Sql) on two different servers.Let say they are Server1 and Server2.I am having some stored procedures(sps) which are executing on Server1.Results given by these sps are 6 different tables(Theses tables are temporary tables e.g #Table1 and they are created in one of the sps on Server1). And I want to use these 6 tables on Server2.
But constraint here is, i can create link server for Server1 from Server2 but not from Server1 to Server2.So i can not access Server2 directly from Server1.
Even if i am using custom tables here instead of temp tables(#) it will take me to solution but that is again a constraint i can not do this.
Is there any alternative solution for Link server in this case?
I dont want to go for OPENROWSET and OPENDATASOURCE b'coz of performance issue.
Thank you in advance!!
Kedar Waghmode.
View 9 Replies
View Related
Oct 4, 2006
For some reason, over a server link, the following call to a UDF on a linked server does not work, it seems it is treating the UDF as a table.The same UDF called on the local server works fine.--call/select from functionSELECT MASTERID FROM PAUL.RISK_DB.dbo.FNTRADEFILEPRICE('10/2/2006')error:Server: Msg 170, Level 15, State 31, Line 5Line 5: Incorrect syntax near '('.Thanks.
View 1 Replies
View Related
May 13, 2008
Hi,
I have two database.and i want to transfer datafrom one to another so for that I need Link server. both the database are in SQL 2005
i have altered the store procedure and login but it give connection time out error.
will u give me some link to understand and implement the same in my app.
EXEC master.dbo.sp_addlinkedserver @server = N'vidyalink', @srvproduct=N'SqlServer', @provider=N'SQLNCLI', @datasrc=N'myb_29074'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'vidyalink',@useself=N'False',@locallogin=NULL,@rmtuser=N'mybe',@rmtpassword='########'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'vidyalink',@useself=N'True',@locallogin=N'sa',@rmtuser=NULL,@rmtpassword=NULL
GO
EXEC master.dbo.sp_serveroption @server=N'vidyalink', @optname=N'collation compatible', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'vidyalink', @optname=N'data access', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'vidyalink', @optname=N'dist', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'vidyalink', @optname=N'pub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'vidyalink', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'vidyalink', @optname=N'rpc out', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'vidyalink', @optname=N'sub', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'vidyalink', @optname=N'connect timeout', @optvalue=N'60'
GO
EXEC master.dbo.sp_serveroption @server=N'vidyalink', @optname=N'collation name', @optvalue=null
GO
EXEC master.dbo.sp_serveroption @server=N'vidyalink', @optname=N'lazy schema validation', @optvalue=N'false'
GO
EXEC master.dbo.sp_serveroption @server=N'vidyalink', @optname=N'query timeout', @optvalue=N'0'
GO
EXEC master.dbo.sp_serveroption @server=N'vidyalink', @optname=N'use remote collation', @optvalue=N'true'
Labour never goes waste.
View 2 Replies
View Related
Jun 4, 2008
hi
How to link xml to sql server 2000?
View 1 Replies
View Related
Jul 20, 2005
Hiis anybody know how to lin Pervasiva/bitrive SQL server on MS SQL server ?ThanksMarcin Sobolewski
View 1 Replies
View Related
Mar 15, 2006
I am planning
to setup a BlackBerry server and connect to a remote SQL Server over a
WAN link with 150+ms ping time. Is there a known tolerance for
SQL server connection latency? For example, I have been told by
RIM that ping time for Exchange should be around 35ms so if it is
higher, a BES should be placed next to the Exchange server. Any reply would be greatly appreciated.
View 4 Replies
View Related