four part name for DB2 linked server
Posted on 2006-10-19
I have set up an AS400 DB2 (DB/2) database as a linked server to my local copy of SQL. The trouble is, I can't figure out how to specify a table name on the linked server in the form that the SQL Server Engine understands.
I have tried
select count(*) from server.libname.tabname
SELECT count(*) FROM [server].[server].[LIBNAME].[tabname]
select count(*) from server.libname..tabname
and many other variations, but I keep getting errors along the lines of.
Invalid object name 'beans..tabname'.
Occurred on Line : 1"
How can a run a select against the DB2 data?