How to change the connection strings of a child package?

  • Hi friends,

    I am trying to execute 10 packages through execute package component. I see the connection strings for the path of the child packages while executing the execute package component. But how to change the connection strings of the child packages?

    Any suggestions would be really appreciated.

  • Use ParentVariable

  • staudacher (11/13/2013)


    Use ParentVariable

    Could you please explain me? you mean selecting Parent package variable in configuration files?

  • Google or Bing or... is your friend.

    try with "ssis parentvariable", that finds more about this theme then you ever can read

    try the first one: http://www.bidn.com/blogs/mikedavis/ssis/155/passing-variable-values-from-parent-package-to-child-ssis

  • All the 10 packages will be having the same connection string..so is it possible to pass one variable which will affect all the package from execute package component task?

  • I think i missunderstood you, sorry.

    You will change the connection path from childtask.

    In the properties from ExecutionTask there is "Expression" where you can change the Connection with Expression builder (or make a file connection, set the ExecutionTask connection to file connection)

    Then change this connection before every call.

  • staudacher (11/13/2013)


    I think i missunderstood you, sorry.

    You will change the connection path from childtask.

    In the properties from ExecutionTask there is "Expression" where you can change the Connection with Expression builder (or make a file connection, set the ExecutionTask connection to file connection)

    Then change this connection before every call.

    Sorry Staud, i need to change the data source connection...not the file connection...

    what i did is, in the master package i created a variable called 'ConnectionString' and passed the value "Data Source=localhost;User ID=sa;Pwd=abc;Initial Catalog= databasename;Provider=SQLNCLI10.1;Integrated Security = SSPI;" and created a XML configration file....then i went to each of the child package and i created a variable with the same name under parent Package variable configuration and selected the connection string property....

    while executing, i changed the value of the variable in the config file of master package but it did not affect the child pacakge...it said ''Connection may not be configured correctly or you may not have the right permissions on this connection."

    I am not sure where i am making mistake....could you please help me?

  • Okay, my first attempting is right.

    In the Parentpackage you have the Variable ConnectionString.

    Make the same Variable in each ChildPackage

    Then in the CildPackages, instead to point to XML, choose ParentPackageVariabel, link the PackageVariable to ChildVariable and then add ChildVariable to the ConnectionString.

    Or try to resove the Error with XML, then it should work to, maybe the path is wrong or permission denied or any else

  • staudacher (11/13/2013)


    Okay, my first attempting is right.

    In the Parentpackage you have the Variable ConnectionString.

    Make the same Variable in each ChildPackage

    Then in the CildPackages, instead to point to XML, choose ParentPackageVariabel, link the PackageVariable to ChildVariable and then add ChildVariable to the ConnectionString.

    Or try to resove the Error with XML, then it should work to, maybe the path is wrong or permission denied or any else

    Yes Staud...that's what i am doing....i did not create XML file for child package..i created it for master pacakge and exactly as like as you told, i created parent variable package config for each child package and i selected the connectionmanager property's connection string...

    but i am not understanding this line

    link the PackageVariable to ChildVariable and then add ChildVariable to the ConnectionString.

    can you tell me please?

  • In my Parent/Child configuration i had trouble with "each child package and i selected the connectionmanager property's connection string" and changed it to "link the StringParentVariable to the StringChildVariable then use ChildVariable as Expression to the Connection"

    But if the direct way works well for you, its better then my detour

  • staudacher (11/13/2013)


    In my Parent/Child configuration i had trouble with "each child package and i selected the connectionmanager property's connection string" and changed it to "link the StringParentVariable to the StringChildVariable then use ChildVariable as Expression to the Connection"

    But if the direct way works well for you, its better then my detour

    Hi Staud, It worked finally...the problem was that i declared the value to the connection variable with "Integrated Security = SSPI"...After taking this, it worked...

    Thank you so much for your kindly help staud...actually, i tried to implement this two years back..but i was not able to understand...Now i got it with all your help..Thanks again...I appreciate your help....

Viewing 11 posts - 1 through 10 (of 10 total)

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