July 11, 2012 at 12:13 pm
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
Since the catalog is created under default, i'm not able to specify the database name in the 4 parts query. I also cannot use ".." because it throws syntax error.
How do i specify the catalog name if there is no name?
Thanks!!
July 11, 2012 at 12:22 pm
if you leave the schema name to auto resolve, does it work, like this?
SELECT * FROM [LINKSERVER_1].[ActualDBName]..DAYPART
Lowell
July 11, 2012 at 12:39 pm
I tried. it doesn't work too 🙁
Msg 7313, Level 16, State 1, Line 1
An invalid schema or catalog was specified for the provider "SAOLEDB.12" for linked server "TWOPLUS_BET_02".
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply