?
Solved

Calling a stored procedure in SSIS for each record

Posted on 2016-09-23
2
Medium Priority
?
224 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
Arifhusen Ansari earned 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
From time to time, for debugging and troubleshooting your flow at run time you’ll need to check if the variable has the correct value or not, there’re several ways to check for the value of the variables inside the flow, You can add Break Points, a …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses

770 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