How do you call a Stored Procedure in SSIS?

后端 未结 2 557
独厮守ぢ
独厮守ぢ 2021-02-05 06:52

I am trying to create an SSIS package that queries data from a table, and calls a stored procedure in another database with each row.

In my old DTS package, I was doing

相关标签:
2条回答
  • 2021-02-05 07:14

    In the Data Flow, the OLE DB Command can be used to execute a SQL statement for each row in a dataflow - (MSDN documentation)

    Alternatively, you can store the source result set in a variable of data type object and use a Foreach Loop container in the Control Flow (example here).

    0 讨论(0)
  • 2021-02-05 07:16

    You will need to use an Execute SQL Task. In the SQLStatement section you can add the code to execute the stored procedure.

    In order to pass in parameters, use the ? syntax and specify the parameters in the "Parameter Mapping" section.

    A good example can be found here.

    0 讨论(0)
提交回复
热议问题