SSIS path - determining during execution

  • Using a SQL Server Agent job to start a SQL Server Integration Services Pachage step.....

    In the package itself, is there a way to pick the path of the package that was started?

    I want to pick up the  "folder"  info of where the package resided that is executing, to help build some variables.

    TIA,

    Doug

  • I don't know if there is a better way yet.  But I found that I could query the catalog.executions view in an Execute SQL task:

    SELECT Folder_Name from catalog.executions WHERE execution_id = ?;

    Then map the parameters:
    System::ServerExecutionID

    Russel Loski, MCSE Business Intelligence, Data Platform

  • Russel Loski - Wednesday, June 27, 2018 12:05 PM

    I don't know if there is a better way yet.  But I found that I could query the catalog.executions view in an Execute SQL task:

    SELECT Folder_Name from catalog.executions WHERE execution_id = ?;

    Then map the parameters:
    System::ServerExecutionID

    Thanks Russel !

    I tested this out and it is giving me exactly what I need to identify the correct executing job.

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

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