DB2/390 as a linked server in a MS SQL Server

Luciano Jardim

DB2/390 as a linked server in a MS SQL Server
Has anyone successfully defined a DB2/390 as a linked server in a MS SQL
Server using DB2 Connect? I am having problems to determine the appropriate
connection string and the necessary setup in the DB2 Connect.

I have DB2/390 V6, DB2 Connect V7, and MS SQL Server 2000.

Any help is very welcome.

Thanks,

Luciano Jardim
[login to unmask email]



Robert Hall

Re: DB2/390 as a linked server in a MS SQL Server
(in response to Luciano Jardim)
Hi Luciano,

I have used a linked server from SQL Server to DB2 OS390 (V5) for testing
purposes. If you go to Enterprise Manager, expand the server, expand
security, then expand linked servers. Right click on linked servers, then
click new linked server. Make the linked server name the LOCATION name of
DB2 (in our system this is the LOCATION parameter used by DDF....you can
look in the MSTR job and do a find on LOCATION to get the value). Under
the General tab, enter in the ODBC name (defined as a data source in DB2
Connect) in the data source field and sysibm in the catalog field. Under
the Security tab enter a mainframe userid and password under "be made using
this security context"). Under the server options, check the data access
box. Click OK to add the linked server.

If you click on the linked server name, you will see a list of the tables
and views on OS390.



Assuming all that works, here is the strange part. The only query I could
get to work is using the OPENQUERY syntax:

select * from openquery(, 'select * from <db2
owner.tablename>')


AND I also ran into conversion problems with the OLE interface, so if you
select from sysibm.systables for example you will see a conversion error.
Because of the restrictions, I abandoned this method of accessing DB2/OS390.


YMMV, standard disclaimers apply, use at your own risk, yadda yadda yadda.



HTH,

Robert




-----Original Message-----
From: Jardim, Luciano [mailto:[login to unmask email]
Sent: Tuesday, January 08, 2002 12:53 PM
To: [login to unmask email]
Subject: DB2/390 as a linked server in a MS SQL Server


Has anyone successfully defined a DB2/390 as a linked server in a MS SQL
Server using DB2 Connect? I am having problems to determine the appropriate
connection string and the necessary setup in the DB2 Connect.

I have DB2/390 V6, DB2 Connect V7, and MS SQL Server 2000.

Any help is very welcome.

Thanks,

Luciano Jardim
[login to unmask email]