Groups | Blog | Home
all groups > sql server dts > may 2004 >

sql server dts : as400


Sean Gahan
5/27/2004 10:55:18 PM
I need to import data from an as400 database, what is the best way to do
this?

Regards,

Sean Gahan

Partha Mandayam
5/28/2004 7:17:30 PM
You should create a linked server to as400 using Microsoft oledb
provider for db2 and then access the data using openquery

Regards

Partha Mandayam
Software Consultant
Home page: http://partha.tripod.com


*** Sent via Developersdex http://www.developersdex.com ***
Sean Gahan
5/28/2004 10:51:09 PM
Partha,
Thank you very much for your response; I am aware that the Host Integration
Server will interface with as400, but can you give me some information on
how to link the servers programmatically? Additionally, can you tell me
where to get the oledb provider for db2?

Regards,

Sean Gahan

[quoted text, click to view]

Partha Mandayam
5/29/2004 12:28:03 PM
use the sp_addlinkedserver command to create a linked server

sp_addlinkedserver [ @server = ] 'server'
[ , [ @srvproduct = ] 'product_name' ]
[ , [ @provider = ] 'provider_name' ]
[ , [ @datasrc = ] 'data_source' ]
[ , [ @location = ] 'location' ]
[ , [ @provstr = ] 'provider_string' ]
[ , [ @catalog = ] 'catalog' ]

use @provider =DB2OLEDB which comes built in with SQL Server.
Refer to BOL for more details on syntax.

Regards

Partha Mandayam
Software Consultant
Home page: http://partha.tripod.com


*** Sent via Developersdex http://www.developersdex.com ***
Raoul Laoyan
6/1/2004 5:22:15 PM
If this is just a straight import, look to using FTP if
the daemon is running on the AS/400. You may need to get
a userid/password on the AS/400 for this task.

If it's bidirectional interchange your looking for, look
into loading the AS/400 client with the database
connectivity packages onto the SQL Server itself. Talk
to your AS/400 systems administrator for this client.

Loading up Host Integration Server would be such a waste
of time and resource just for one particular task.

Good luck,


[quoted text, click to view]
Sean Gahan
6/3/2004 12:09:40 AM
Raoul,
Great advice! I'll look into using FTP.

Regards,

Sean Gahan


[quoted text, click to view]

AddThis Social Bookmark Button