Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Distributed Query with Linked Servers

Author  Topic 

ayemyat
Starting Member

2 Posts

Posted - 2012-07-11 : 12:28:23
Hi,

I have a linked server to Sybase Database using SQL Anywhere Driver.
The catalog is created under "default" catalog an schema name is "DBA",
Linked Server Name is LINKSERVER_1.

The conenction is successful and i can query my data with OPENQUERY.
SELECT * FROM OPENQUERY(LINKSERVER_1,'select * from DAYPART')

Howerver, I am not able to use the distributed query. Any Idea?

SELECT * FROM [LINKSERVER_1]..DBA.DAYPART
Error:
OLE DB provider "SAOLEDB.12" for linked server "LINKSERVER_1" returned message "Syntax error near 'DBA' on line 1".
Msg 7306, Level 16, State 2, Line 1
Cannot open the table ""DBA"."DAYPART"" from OLE DB provider "SAOLEDB.12" for linked server "LINKSERVER_1".



I also try with the followings but it throws the following error.
Msg 7313, Level 16, State 1, Line 1
An invalid schema or catalog was specified for the provider "SAOLEDB.12" for linked server

SELECT * FROM [LINKSERVER_1].[ActualDBName].DBA.DAYPART
SELECT * FROM [LINKSERVER_1].[Default].DBA.DAYPART
SELECT * FROM [LINKSERVER_1]...DAYPART


visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-07-11 : 12:47:25
see
http://support.microsoft.com/kb/280102

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

ayemyat
Starting Member

2 Posts

Posted - 2012-07-11 : 13:07:40
is double dot ".." for default catalog not supported by MsSQL server?

I'm not able to difine the database(catalog) in 4 names query because the catalog is creaed under "default" in the linked server.

Thanks.
Go to Top of Page
   

- Advertisement -