none
Parent to Child and Child to parent variable call in SSIS

    Question

  • Hi - i have 2 pkgs both acts like parent/child to each other. When i execute either one, it keeps executing...any idea how to break the loop? I used pkg configuration and created variables to call each other.

    Thank you,

    Kashyap

     

    Friday, February 03, 2012 8:11 PM

All replies

  • You could write an execution count veriable to a temp table, and then only call the package based on the value of the execution count value.

    So you could have an exec sql task that creates a temp table, then before you call the package, have an exec sql task that checks the value in this table and a precedence constraint that checks the value in this table is lower than required "break" limit. Then another exec sql task after you call the package to increment the value in this table.

    I must ask though...Recursive loop in SSIS, do you really need to do this?

    Pete


    Peter Carter http://sqlserverdownanddirty.blogspot.com/
    Sunday, February 05, 2012 1:31 PM
  • Hi Pete, no i am not looking for recursive loop, after single execution i need the pkg to stop but it is keep executing...both pkg start with script and scripts has variables.
    Sunday, February 05, 2012 5:14 PM
  • Hi Gurudevam,

     

    In that case, my suggestion would remain as above. Create a temp table. Increment the value when you call the package, and then only call the other package based on the value of this counter. I hope the approach makes sense.

     

    Pete


    Peter Carter http://sqlserverdownanddirty.blogspot.com/
    Monday, February 06, 2012 9:32 PM