none
How to call a stored procedure in Execute SQL task? RRS feed

  • Question

  • hi there,

    can anyone show me how to call or run a stored procedure via Execute SQL Task in SSIS 2008? thanks in advance.

     


    allan
    Tuesday, January 3, 2012 4:43 AM

Answers

  • hi there,

    can anyone show me how to call or run a stored procedure via Execute SQL Task in SSIS 2008? thanks in advance.

     


    allan


    HI Allan ,

    Its straight forward same as you would have executed the sp in SSMS

    say : EXEC sp_UPDATE_MY_TABLE ...

    what are u stuck at actually ?

    syntax ? setting up result set ? or some parameterization ? for the sp call ?

     check out : http://technet.microsoft.com/en-us/library/ms141003.aspx

     


    Hope that helps ... Kunal
    • Edited by Kunal Joshi Tuesday, January 3, 2012 5:25 AM
    • Proposed as answer by MS308 Tuesday, January 3, 2012 7:11 AM
    • Marked as answer by allan8964 Wednesday, January 11, 2012 4:47 AM
    Tuesday, January 3, 2012 5:23 AM
  • Hi allan,

    You can drag the Execute SQL Task from the ToolBox to the control flow, and then configure the SQL Statement node as below(SPName represent the stored procedure name for example):

    ConnectionType: OLE DB
    Connection: Connect to the database that you need
    SQLStatement: Exec SPName

    Here is article details about how to run stored procedure via Execute SQL Task:

    Execute SQL Tasks: Using Stored Procedures: http://decipherinfosys.wordpress.com/2008/04/14/execute-sql-tasks-using-stored-procedures/

    If you have any question, please feel free to ask.

    Thanks,
    Eileen

    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Edited by Eileen Zhao Wednesday, January 4, 2012 11:35 AM
    • Marked as answer by Eileen Zhao Tuesday, January 10, 2012 1:02 AM
    Wednesday, January 4, 2012 10:23 AM

All replies

  • hi there,

    can anyone show me how to call or run a stored procedure via Execute SQL Task in SSIS 2008? thanks in advance.

     


    allan


    HI Allan ,

    Its straight forward same as you would have executed the sp in SSMS

    say : EXEC sp_UPDATE_MY_TABLE ...

    what are u stuck at actually ?

    syntax ? setting up result set ? or some parameterization ? for the sp call ?

     check out : http://technet.microsoft.com/en-us/library/ms141003.aspx

     


    Hope that helps ... Kunal
    • Edited by Kunal Joshi Tuesday, January 3, 2012 5:25 AM
    • Proposed as answer by MS308 Tuesday, January 3, 2012 7:11 AM
    • Marked as answer by allan8964 Wednesday, January 11, 2012 4:47 AM
    Tuesday, January 3, 2012 5:23 AM
  • Hi allan,

    You can drag the Execute SQL Task from the ToolBox to the control flow, and then configure the SQL Statement node as below(SPName represent the stored procedure name for example):

    ConnectionType: OLE DB
    Connection: Connect to the database that you need
    SQLStatement: Exec SPName

    Here is article details about how to run stored procedure via Execute SQL Task:

    Execute SQL Tasks: Using Stored Procedures: http://decipherinfosys.wordpress.com/2008/04/14/execute-sql-tasks-using-stored-procedures/

    If you have any question, please feel free to ask.

    Thanks,
    Eileen

    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    • Edited by Eileen Zhao Wednesday, January 4, 2012 11:35 AM
    • Marked as answer by Eileen Zhao Tuesday, January 10, 2012 1:02 AM
    Wednesday, January 4, 2012 10:23 AM