Connection to DB2 problem

Last Post 05 Oct 2007 05:43 AM by fcaserio. 1 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
fcaserio
New Member
New Member

--
05 Oct 2007 05:19 AM
I'm having problems selecting data from a Linked Server pointing ta a UDB DB2 database.
I'm able to connect to the database, however, for some reason I can't read the tables. My queries returns that the table does not exists.
Am I missing something here?
The user db2admin is the database administrator.

This is my Linked Server definition:

EXEC sp_addlinkedserver
@server='TESTE',
@srvproduct='IBM OLE DB Provider for DB2',
--@catalog='',
@provider='IBMDADB2',
@provstr='Hostname=192.168.1.59;Database=DADOSMP8;Protocol=TCPIP;Port=50000'
EXEC sp_addlinkedsrvlogin 'TESTE', 'false', NULL, 'db2admin', 'db2admin'
ACESSO REMOTO:
189.19.58.15
-->RPC enabled via Enterprise Manager

This is my test:
SELECT * FROM TESTE..DB2ADMIN.TMK0101

Result:
Msg 7314, Level 16, State 1, Line 1
The OLE DB provider "IBMDADB2" for linked server "TESTE" does not contain the table ""DB2ADMIN"."TMK0101"". The table either does not exist or the current user does not have permissions on that table.
fcaserio
New Member
New Member

--
05 Oct 2007 05:43 AM
How do I use OPENQUERY?

I'm trying:
SELECT * FROM OPENQUERY(TESTE,"SELECT * FROM DADOSMP8.DB2ADMIN.TMK0101")

And receiving an error:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'SELECT * FROM DADOSMP8.DB2ADMIN.TMK0101'.
You are not authorized to post a reply.

Acceptable Use Policy