Set child package Connection Manager property from parent package variable configuration.
Environment SQL Server 2005 SP3 Server: Microsoft SQL Server Management Studio 9.00.4035.00 Microsoft Analysis Services Client Tools 2005.090.4035.00 Microsoft Data Access Components (MDAC) 2000.086.3959.00 (srv03_sp2_rtm.070216-1710) Microsoft MSXML 2.6 3.0 5.0 6.0 Microsoft Internet Explorer 6.0.3790.1830 Microsoft .NET Framework 2.0.50727.3620 Operating System 5.2.3790 Development Workstation: Windows XP Professional x64 Edition Version 2003 Service Pack 2 Microsoft Visual Studio 2005 Version 8.0.50727.762 (SP.050727-7600) Microsoft .NET Framework Version 2.0.50727 SP2 Installed Edition: IDE Standard Microsoft Visual Studio 2005 Premier Partner Edition - ENU Service Pack 1 (KB926601) Microsoft SQL Server Analysis Services Designer Version 9.00.4035.00 Microsoft SQL Server Integration Services Designer Version 9.00.4035.00 Microsoft SQL Server Reporting Services Designers Version 9.00.4035.00 I have a parent package (Parent_Package) that calls a child package (412512_Biz_Asset_SS2SS_Package). I am reading runtime environmental information from a (bootstrap) Windows XP System Environmental variable and then a SQL Server table. Three parent package variables (sourceRDBParent, targetRDBParent, targetServerParent) are being correctly set (verified by setting a breakpoint and inspecting the variable values in the parent package and comparing them to the values in the SQL Sever configuration data table). In the child package, I have set up 3 configurations (one for each parent package variable) that are being used to set 3 Connection Manger properties. One of these properties, for example, is the name of the destination database (InitialCatalog) \Package.Connections[DestinationConnectionOLEDB].Properties[InitialCatalog] where "DestinationConnectionOLEDB" is the connection manager for the destination database. I set a second breakpoint as the child package data flow task is beginning to execute, but the target Connector Manager properties are not correctly set in the child configuration (as verified by looking at the Connection Manager Properties). Why not? The trace up to the child package OnPreExecute event is seen below... Information: 0x40016038 at Parent_Package: The package is attempting to configure from the environment variable "SSIS_ROOT". Information: 0x40016040 at Parent_Package: The package is attempting to configure from SQL Server using the configuration string ""BCDEVDB1.ssis_configuration";"[dbo].[MigrationConfiguration]";"412_512";". SSIS package "Parent_Package.dtsx" starting. Executing ExecutePackageTask: C:\projects\migration\work\412_to_512\TestIntegrationServicesProject\TestIntegrationServicesProject\412512_Biz_Asset_SS2SS_Package.dtsx Information: 0x40016042 at 412512_Biz_Asset_SS2SS_Package: The package is attempting to configure from the parent variable "sourceRDBParent". Information: 0x40016042 at 412512_Biz_Asset_SS2SS_Package: The package is attempting to configure from the parent variable "targetRDBParent". Information: 0x40016042 at 412512_Biz_Asset_SS2SS_Package: The package is attempting to configure from the parent variable "targetServerParent". Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning. Information: 0x40016042 at 412512_Biz_Asset_SS2SS_Package: The package is attempting to configure from the parent variable "sourceRDBParent". Information: 0x40016042 at 412512_Biz_Asset_SS2SS_Package: The package is attempting to configure from the parent variable "targetRDBParent". Information: 0x40016042 at 412512_Biz_Asset_SS2SS_Package: The package is attempting to configure from the parent variable "targetServerParent". Information: 0x4004300A at Data Flow Task, DTS.Pipeline: Validation phase is beginning. SSIS breakpoint 'Break when the container receives the OnPreExecute event' at executable 'Data Flow Task' has been hit Any ideas around what I have missed?
May 16th, 2011 8:58pm

Do you get an error or the child package retains the dev time value? Perhaps a typo in the name of the variable spoiled the intent. How about you follow this MSDN article to double check if you linked the variables properly :http://msdn.microsoft.com/en-us/library/ms345179.aspx?Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
May 16th, 2011 11:24pm

Do you get an error or the child package retains the dev time value? Perhaps a typo in the name of the variable spoiled the intent. How about you follow this MSDN article to double check if you linked the variables properly :http://msdn.microsoft.com/en-us/library/ms345179.aspx?Arthur My Blog
May 16th, 2011 11:24pm

put error message here if you got any error.http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2011 1:45am

put error message here if you got any error.http://www.rad.pasfu.com
May 17th, 2011 1:45am

Here you can find some links which will show you how to Use the Values of Parent Variables in a Child Package? http://www.bidn.com/blogs/ravigo/ssas/1471/stub312 http://blogs.lessthandot.com/index.php/DataMgmt/DBAdmin/variables-ssis-dynamic-parent-to-child http://msdn.microsoft.com/en-us/library/ms345179.aspx Thanks, Kapil Khalas - Database Developer
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2011 10:01am

Thanks for the reply. > Do you get an error or the child package retains the dev time value No error, the child package retains the dev time value of the Connection Manger property (minor point - I am not setting a child package variable, I am setting a child package connection manager property). > Perhaps a typo in the name of the variable spoiled the intent. No variable in the child, just the parent, and at the parent package breakpoint, the parent variable value is set correctly from its configuration. I cut/paste from the parent variable into the child package parent-package-configuration setup wizard and I am sure it is accurate. (In the "Select Configuration Type" dialog for example "sourceRDBParent", and not "User::sourceRDBParent".) > follow this MSDN article to double check if you linked the variables properly Yup, 2x checked. Again, I am not linking to a child package variable, but a child package property. In this case, a property under "Connection Managers", as stated above. The Configuration shows the correct "Target Object" (the desired connection manager) and the connection manger's "Target Property" I am still stumped!
May 17th, 2011 2:48pm

No errors seen.
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2011 2:48pm

A bit more information. I set DelayValidation to True everywhere in both packages. Same bad behavior. I *added* a child package user variable, and another Parent Package Variable Package Configuration that sets the user variable, and it looks good at runtime (I set a breakpoint). So it appears that the Parent Package Variable Package Configuration setup is correct, though the the same bad behavior is seen. One runtime oddity that might indicate a timing/sequencing issue: When I run the child package standalone, it inserts all data into the design-time target database tables (6 of 8 tables have data to insert). When I run the child package from the parent package, it inserts most data into the design-time target database tables (4 of the 6 tables with data), but it inserts some data into the runtime target database tables (2 of the 6 tables with data). I am not sure how this could be, as my parent package has only one Control Flow item (the Execute Package Task), and the child package has only one Control Flow item (the Data Flow Task). The child package data flow task has (8) Data Flow Sources linked to (8) Data Flow Destinations (one for each source and target table), and the source-destination pairs are each linked to each other, but not to the other 7 pairs (the order of execution of the 8 is unimportant). Does this help to understand the root cause of the issue better?
May 17th, 2011 7:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics