February 15, 2005 at 9:52 pm
Is it possible to insert data from SQL Server to DB2 server using linked server?
Can it be done using a DTS package where I pass linked server name and remote database name as a parameters to a stored procedure?
Any ideas?
February 15, 2005 at 10:39 pm
If you are using DTS, can't you make a connection to DB2 without the linked server?
You probably already have the DB2 client tools installed right ?
Isn't there an OLE/DB or ODBC driver included in the tools?
--------------------
Colt 45 - the original point and click interface
February 16, 2005 at 9:19 am
I am told Linked Servers are faster than DTS. I use linked server through ODBC driver (DSN).
February 16, 2005 at 1:44 pm
I find that hard to believe. I haven't dealt specifically with DB2, but interfacing to other vendors databases has always been extra slow using a Linked Server.
Have you done any performance comparison?
--------------------
Colt 45 - the original point and click interface
February 16, 2005 at 10:09 pm
Use this stored procedure it is using MS OLE DB Provider, assuming you are NOT using host integration server you can alter it as per your requirment
EXEC sp_addlinkedserver
@server='YOURDB2',
@srvproduct='Microsoft OLE DB Provider for DB2',
@catalog='DB2DATABASE',
@provider='DB2OLEDB',
@provstr='Initial Catalog=PUBS;Data Source=DB2;HostCCSID=1252;Network Address=10.0.0.1;Network Port=50000;Package Collection=admin;Default Schema=admin;'
GO
EXEC sp_addlinkedsrvlogin 'YOURDB2', false, 'SQLUSERNAME', 'DB2USERNAME', 'SQLPASSWORD'
GO
SELECT *
FROM YOURDB2.DB2DATABASE.OBJECTOWNER.TABLENAME
This will give you enough idea which route to take.
------------
Sr. DBA Developer
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy