SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to change the connection strings of a child package?


How to change the connection strings of a child package?

Author
Message
prakashr.r7
prakashr.r7
SSC Veteran
SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)

Group: General Forum Members
Points: 232 Visits: 197
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.
staudacher
staudacher
SSC Journeyman
SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)

Group: General Forum Members
Points: 89 Visits: 243
Use ParentVariable
prakashr.r7
prakashr.r7
SSC Veteran
SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)

Group: General Forum Members
Points: 232 Visits: 197
staudacher (11/13/2013)
Use ParentVariable


Could you please explain me? you mean selecting Parent package variable in configuration files?
staudacher
staudacher
SSC Journeyman
SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)

Group: General Forum Members
Points: 89 Visits: 243
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
prakashr.r7
prakashr.r7
SSC Veteran
SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)

Group: General Forum Members
Points: 232 Visits: 197
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?
staudacher
staudacher
SSC Journeyman
SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)

Group: General Forum Members
Points: 89 Visits: 243
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.
prakashr.r7
prakashr.r7
SSC Veteran
SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)

Group: General Forum Members
Points: 232 Visits: 197
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?
staudacher
staudacher
SSC Journeyman
SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)

Group: General Forum Members
Points: 89 Visits: 243
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
prakashr.r7
prakashr.r7
SSC Veteran
SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)SSC Veteran (232 reputation)

Group: General Forum Members
Points: 232 Visits: 197
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?
staudacher
staudacher
SSC Journeyman
SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)

Group: General Forum Members
Points: 89 Visits: 243
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
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search