Acquire Connection and Strange behavior when using Execute Package Task
Asked Answered
K

2

9

I've a Master package where in I'm calling several packages using Execute package task.

Both child and master packages don't have any configuration and are connecting OLEDB (SQL Server) using hardcoded SQL authentication connections in the connection managers.

Also the packages have encrypt sensitive with the password.

Strange behavior seen: 1. Child Packages run successfully when run from BIDS but fail when run from master packages with Acquire Connection failure

"The AcquireConnection method call to the connection manager failed with error code 0xC0202009"

Can someone help with the resolution for this?

Kaete answered 11/8, 2012 at 18:46 Comment(3)
The strange behavior continues: Child package runs successfully from MSDB, BIDS but fails when executed from a master SSIS package.Kaete
Have you provided the password for the child package when you attempt to run the package from the master package?Chert
Include a config file for the master package and then select the property PackagePassword for the component Execute Package Task .Open the xml file which was created and store the password and use this file in SQl Agent Data Configuration Tab.Explained in detail belowBarmecidal
B
3

It seems that your child package is not getting the connection string from your parent package .You need to pass connection string from Parent to child package .

Check this article

Update :-

When you have EncryptSensitiveWithPassword as an access control for both your child and parent package then while executing the child pkg from parent package

You will be prompted to enter the password for your child package during execution .

There may be scenarios that even after entering the password at the run time child pkg execution fails due to acquire connection error .This may happens ( im not sure ) due to the child connection string (In Execute Package Task ) which may still be pointing to the old child package which has not been rebuild after the modification .

My Suggestion is when you drag a Execute SQL Task onto the control flow use the file System Location and point to the updated child package placed in the bin folder ( or your deployment path ) and enter the password of your child package in the task

enter image description here

In order to run the parent package from Integration Service (MSDB) then you need to some how pass the child decryption key while executing at run time .

Edit : Step 1 : Create a Package Configuration for parent SSIS package .Execute Package Task has a property PackagePassword.You need select this property while creating the config file

      Executables->ExecutePackageTask->PackagePassword

enter image description here

Step 2 : After creating the XML file open it and search for the ConfiguredType=property and in the configured Value enter the password for your child package

enter image description here

Step 3:After importing the parent package in MSDB select the configuration file in the configuration tab enter image description here

Barmecidal answered 12/8, 2012 at 4:30 Comment(5)
Both have different connections so i'm not passing connections from master to childKaete
Do have an xml config file for your child package?Barmecidal
No as I had already mentioned that both packages dont have config files of any sortKaete
Actully as I said earlier. Both the packages are in MSDB. If I run the child packages from the MSDB (right click run package) it runs successfully. ONly problem is with the execute package taskKaete
you need to pass the decryption password for your child package at run time for that you need to create an configuration file .I have updated my answer. Your parent package doesnt store the information of your child package .You need to create a config file for your parent package or in your sql agent you need to specify the connection in the data source tab as suggested by DiegoBarmecidal
K
1

64/32 bit error? Do you have excel connection managers as source maybe?

Dtexec have both a 64-bit and a 32-bit application. I assume that when you run from BIDS, it uses the 32 bits dtexec and how are you running the master? If you are double clicking it, that may be the issue because DTExecUI (Execute Package Utility) is available only as a 32-bit application. If you are working on a 64-bit server and run a package through the DTExecUI , the package will run in 32-bit emulation mode. Furthermore, the package might fail if the connection managers used are not 32-bit compliant.

Be sure to note that if you develop a package in a 32-bit environment and want to run the package in a 64-bit environment, the connection managers need to be 64-bit compliant. Some connection managers such as Excel work in a 32-bit environment only.

EDIT: try setting the password here: enter image description here

Kiley answered 13/8, 2012 at 13:55 Comment(5)
Both the packages are developed and deployed on same server which is 64 bit. And there is no excel connection manager.Kaete
and how are they being called? If you call from a 32 bit computer, it will use the 32 bit architecture.Kiley
can yo ucalso give more info regarding how are you calling the master? Is it deployed to the msdb or file system?Kiley
Both child and master are in MSDB and the master is scheduled using SQL Server agentKaete
humm I'm pretty sure the problem is that since you set the package with EncryptSensitiveWithPassword, the sensitive information on it is not being saved once it is on msdb. If the password is not provided, the package will be executed but without the sensitive data, causing it to fail. It’s necessary to inform the password to run the package. Try editing the step that runs the pacakge and set the passowrd on the "Data sources" tab where yo uhave access to the connection stringKiley

© 2022 - 2024 — McMap. All rights reserved.