Solved

Calling a stored procedure in SSIS for each record

Posted on 2016-09-23
2
88 Views
Last Modified: 2016-09-27
Hi Guys,

I want to execute a stored procedure for each record in the source system.
should i use script component or any other transformation / control?

Please note that my stored procedure has got parameters. That means that i would need to pass some of the columns from source as parameters.

regards
0
Comment
Question by:shah36
2 Comments
 
LVL 12

Accepted Solution

by:
Arifhusen Ansari earned 500 total points
ID: 41812400
Use the Execute sql task to get records from the source system. may be from table.

Store the output of execute sql task in Record set.

Use for each loop container and iterate that record set.

You can get the data from each row of the record and values can be assigned to variables.

You have to use other execute sql task in for each loop container and execute the stored procedure from that Execute sql task. You can use that variable to pass the value in stored procedure as parameter.

use below screen to configure ADO Enumerator.

2016-09-23_18-42-49.png
Refer below screen to assign the variable2016-09-23_18-43-15.png value.
0
 

Author Closing Comment

by:shah36
ID: 41817403
Thank you very much. It works however i have found that the OLEDB Command control does exactly the same  and that is quite easy to use and requires no code.

regards
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In couple weeks ago, I encountered an extremely difficult problem while deploying 2008 SSIS packages to a new environment (SQL Server 2014 standard).  My scenario is: We have one C# application that is calling 2008R2 SSIS packages to load text fi…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question