Thursday, March 8, 2012

Calling a AS400 (IBM DB2) Stored Procedure from within SSIS Package

Hi:

I would like to find out how would I call an AS400 (IBM DB2) iSeries Stored Procedure from within my SSIS Package. What tasks should i be using? and do I need any additional adapters installed on my machine to access AS400(IBM DB2). Thanks.

MA

--Run this scrpit, AS400 is the name of your AS400 name
EXEC master.dbo.sp_addlinkedserver @.server = N'AS400', @.srvproduct=N'DB2 UDB for iSeries', @.provider=N'MSDASQL', @.datasrc=N'AS400', @.catalog=N'AS400DBNAME'
-- It will create a linked server name AS400, dtascrc parameter is the name of ODBC_DSN
--Open this linked server and add the UserID/Password--
Once this is done, then use the following to call the stored proc


Exec ('Call Library.StoredProc (?)') AT AS400

Task Name is Execute SQL Task, iSeries Navigator/drivers should be installed on the server.

This is very good article on this

http://www.mcpressonline.com/mc/.6b344718

No comments:

Post a Comment