Monday, February 20, 2012

Linked Server to DB2

I am trying to define a linked server to an As400 running DB2 and am having no luck. If anyone out there has done it successfully, please let me know how.

Thanks!

Did you ever figure this out? I'm having the same issue.|||

Please try

1) Installed Host Integration 2000 client license on the SQL Server 2000 server
2) Made sure that the TCP/IP DDM Server is running on the AS400
3) All minimum requirements on the server and the host are met for the
provider
4) Verified the connection/catalog/provider strings
5) Verified the user name and password used to connect to the host

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q218590

HTH

|||

I did get this to work. The script to define the linked server is below. Note that my AS400 is named BKL400. It is not the fastest thing in the world but it sure does come in handy in certain situations. If you still have problems, email me with contact information and we can talk.

/****** Object: LinkedServer [BKL400] Script Date: 06/05/2006 17:00:01 ******/

EXEC master.dbo.sp_addlinkedserver @.server = N'BKL400', @.srvproduct=N'Microsoft OLE DB Provider for DB2', @.provider=N'DB2OLEDB', @.datasrc=N'BKL400', @.provstr=N'Data Source=bkl400;User ID=xxxxxxxxx;password=xxxxxxxxx;Initial Catalog=bkl400;Provider=DB2OLEDB;Persist Security Info=True;Network Address=bkl400;Package Collection=QSYS2;DBMS Platform=DB2/AS400', @.catalog=N'BKL400'

GO

EXEC master.dbo.sp_serveroption @.server=N'BKL400', @.optname=N'collation compatible', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'BKL400', @.optname=N'data access', @.optvalue=N'true'

GO

EXEC master.dbo.sp_serveroption @.server=N'BKL400', @.optname=N'dist', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'BKL400', @.optname=N'pub', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'BKL400', @.optname=N'rpc', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'BKL400', @.optname=N'rpc out', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'BKL400', @.optname=N'sub', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'BKL400', @.optname=N'connect timeout', @.optvalue=N'0'

GO

EXEC master.dbo.sp_serveroption @.server=N'BKL400', @.optname=N'collation name', @.optvalue=null

GO

EXEC master.dbo.sp_serveroption @.server=N'BKL400', @.optname=N'lazy schema validation', @.optvalue=N'false'

GO

EXEC master.dbo.sp_serveroption @.server=N'BKL400', @.optname=N'query timeout', @.optvalue=N'0'

GO

EXEC master.dbo.sp_serveroption @.server=N'BKL400', @.optname=N'use remote collation', @.optvalue=N'true'

No comments:

Post a Comment