Dynamically execute SSIS package.

  • ugh3012

    SSChasing Mays

    Points: 648

    I am trying to figure out how to dynamically execute SSIS package based on file path that are stored in the table. I found some examples online, it won’t work for me for some reason.  The path could be something like this \\ServerName\\SubFolder\Name.DTSX. Most examples I found online has something to do with SQL Server under location. I tried with File System, but it requires connection manager and the connection manager don’t have expression.  I am not sure what options I have. Any suggestions is appreciated. I am using VS 2015

    Thanks

  • Phil Parkin

    SSC Guru

    Points: 243844

    Call DTExec, with the relevant parameters (full file path is one of them).

    Take a look here.

    If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

  • ugh3012

    SSChasing Mays

    Points: 648

    That is one option we cannot do at this time. Is there a way to have SSIS invoke other SSIS package dynamically?

    Thanks.

  • Phil Parkin

    SSC Guru

    Points: 243844

    ugh3012 wrote:

    That is one option we cannot do at this time. Is there a way to have SSIS invoke other SSIS package dynamically?

    Thanks.

    Use an Execute Process task to call DTExec?

    I'm guessing that you do not have some sort of aversion to DTExec itself, given that this is the executable which runs SSIS packages?

    If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

  • frederico_fonseca

    SSChampion

    Points: 14211

    don't know what you tried but for sure you didn't look where you should.

     

    1 - Add new variable - @package - type string

    2  - Add new Execute Package task

    2.1 - Select filesystem - create new connection - enter name of an existing package.

    3 - go to the properties (e.g. right click - properties which should show up on a window - not a popup window) of the connection created above - you have expressions available - change connection string to be from variable above.

    steps 2 to 3 can be executed on a for each loop that populates the variable - or other means if required.

  • ugh3012

    SSChasing Mays

    Points: 648

    frederico_fonseca wrote:

    don't know what you tried but for sure you didn't look where you should.

    1 - Add new variable - @package - type string

    2  - Add new Execute Package task

    2.1 - Select filesystem - create new connection - enter name of an existing package.

    3 - go to the properties (e.g. right click - properties which should show up on a window - not a popup window) of the connection created above - you have expressions available - change connection string to be from variable above.

    steps 2 to 3 can be executed on a for each loop that populates the variable - or other means if required.

    LOL. I feel stupid. I was not expecting the expression to be in that properties section of VS. Many thanks.

     

     

  • Phil Parkin

    SSC Guru

    Points: 243844

    And I feel stupid for not having double-checked the obvious solution!

    If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

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

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