Executing a S.P. from DTS

  • Does any one know if you can execute a stored procedure from a DTS package? i.e.

    --Start of DTS code--

    select * into a_table from some_table

    --other code--

    exec database.owner.Stored Proc 'Parameter_1','Parameter_2','Parameter_3'

    --other code--

    --end of DTS code--

  • Yes.  Use the "Execute SQL Task" and make sure it uses a connection using the appropriate server and database.

    Take care,

    Bert

    "Speculations? I know nothing about speculations. I'm resting on certainties. I know that my Redeemer lives, and because He lives, I shall live also." - Michael Faraday

  • As Bert describes and you use question marks as parameter placeholders

    So: exec sp_MYStoredProc ?,?,?  takes 3 parameters

    The parameters tab allows you to allocate Input parameters from global variables in the DTS and you can return output parameters as row value or rowset. These can be allocated to global variables to use in the rest of the package. Its in the help on Execute SQL task.

    Good Luck

    Dean 

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply