Thursday, March 29, 2012

DB2OLEDB and Linked Servers

Has anyone had any success with linked servers and DB2. My DB2 knowledge is
very limited.
EXEC sp_addlinkedserver
@.server = 'SERVERR2',
@.srvproduct = 'Microsoft OLE DB Provider for DB2',
@.provider = 'DB2OLEDB',
@.provstr='Network Transport Library=TCPIP;Network Address=10.73.102.115;User
ID=myuser;Password=mypassword;'
OLE DB provider "DB2OLEDB" for linked server "SERVERR2" returned message
"The parameter is incorrect.".
Msg 7399, Level 16, State 1, Line 1
The OLE DB provider "DB2OLEDB" for linked server "SERVERR2" reported an
error. One or more arguments were reported invalid by the provider.
Msg 7303, Level 16, State 1, Line 1
Cannot initialize the data source object of OLE DB provider "DB2OLEDB" for
linked server "SERVERR2".
Any help would be appreciated. Thanks,
Andrew Robinson
http://blog.binaryocean.comHi Andrew,
Welcome to use MSDN Managed Newsgroup Support!
From your description, my understanding of this issue is: When you use the
sp_addlinkedserver
to add a DB2 Server, you got the following error message:
OLE DB provider "DB2OLEDB" for linked server "SERVERR2" returned message
"The parameter is incorrect.".
If i misunderstood your concern, please feel free to point it out.
According to the error message, you may re-configure the provider string.
Here is the sample from SQL Server 2000 Books online:
Use the Microsoft OLE DB Provider for DB2
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;'
Also, you can find more details in this article:
INF: Configuring Data Sources for the Microsoft OLE DB Provider for DB2
http://support.microsoft.com/default.aspx/kb/218590
You can create a Microsoft data link file (UDL) and test whether you can
connected to DB2 Server successfully.
1. Create a Text file named TestConnection.txt
2. Modify the file named to TestConnection.udl and click Yes in the
Rename dialog box.
3. Double click the TestConnection.udl file and you can follow the
article above to test the connection.
Hope this will be helpful! Thank you for your patient. If there are further
questions on the issue, please feel free to let us know. Have a great day!
Wei Lu
Microsoft Online Partner Support
========================================
==============
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.|||Hi Andrew,
Just checking in to see if the suggestions were helpful. Please let us
know if you would like further assistance.
Have a great day!
Sincerely yours,
Wei Lu
Microsoft Online Partner Support
========================================
==============
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
========================================
=============
This posting is provided "AS IS" with no warranties, and confers no rights.

No comments:

Post a Comment