Storing a SP Name in a Variable

  • Hi Guys

    I have a SSIS package which has multiple stored procedure within it.

    Eg. SP1 --> SP2 --> SP3 --> SP4

    The thing that I am trying to achieve is when the stored procedure is running the package will store that name of the procedure within a variable which can then be passed through a failure email to the user.

    I know I could add separate email tasks to each stored procedure, but the package is likely to grow and the design could end up rather messy.

    Does anyone know if this is possible to do?

    Thanks

  • You could have a package variable - ProcName, for example - which is set as a parameter by the stored proc as part of an Execute SQL task. Or you can set the variable value in a Script task (so have a script task between multiple Execute SQL tasks) - or just a single Script task to execute all the sp's and set the variable ... and probably 10 more variants that I can't think of ...

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

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

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