Sunday, March 25, 2012

accessing DB2 table from sql server and asp.net page


Hi ...
I have successfully installed Db2 client configuration tools in sql server and then created a link server to db2 server . I am correctly selecting IBM db2 provider through provider name dropdown in create link server dialog box (general tab) . However , I am unable to fill the data for 3 requirements ...1)product name (Is this db2 database name ?) 2) Data source (What is this ) 3)provider string ...(I tried various combinations ...But didn't succeed)(The msdn has given example of creating linked server like <code>

This example creates a linked server named DB2 that uses the Microsoft OLE DB Provider for DB2.

EXEC sp_addlinkedserver @.server='DB2', @.srvproduct='Microsoft OLE DB Provider for DB2', @.catalog='DB2', @.provider='DB2OLEDB', @.provstr='Initial Catalog=PUBS;Data Source=DB2;HostCCSID=1252;Network Address=XYZ;Network Port=50000;Package Collection=admin;Default Schema=admin;'

</code>


Then in Security tab I gave remote login and password

However I am unable to get tables view for the db2 database in sql server . It is showing errors like initialisation ....Provider DB2OLEDB etc... Can anyone pl help .
Is there any other way ?

Bhat

Rather thanNetwork Address=XYZ I believe you need to substitute an IP address for theXYZ.
|||Ya that's obvious ... I had given Ip Address of DB2 server ...|||Resolved ,
Courtesy...follwing link
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49610

No comments:

Post a Comment