Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 can I call a sp from an ssis package

Author  Topic 

Nader
Starting Member

41 Posts

Posted - 2010-04-29 : 21:55:40
can I use SSIS to get xml documents from a directory and give it as an argument to a stored procedure
I receive xml files from another system but they are not formatted the way that our tables are constructed and we extract only part of the data.
I have a stored procedure that can read an xml string and extract the required data
I need to know how can I use ssis to go thru the xml documents in a folder and provide one by one to the stored procedure as an argument and how to schedule such a task to run at the background and process the files as they arrive.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-04-30 : 02:49:20
use for eack loop with fil enumerator. use SQL task to call sp.

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Nader
Starting Member

41 Posts

Posted - 2010-05-04 : 22:33:37
Thanks
Can you clearify this more. I used the file enumerator but how can I get the file name and provide it as a parameter to a stored procedure
I used the sql task and wrote exec usp_process but was not able to pass the file name as an argument to the sp
Thanks again
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-05-05 : 02:37:05
see this as an example

http://www.sqlis.com/post/Looping-over-files-with-the-Foreach-Loop.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Nader
Starting Member

41 Posts

Posted - 2010-05-11 : 01:15:46
Thanks a lot
Go to Top of Page

Nader
Starting Member

41 Posts

Posted - 2010-05-11 : 10:47:55
Thanks
Go to Top of Page
   

- Advertisement -