Question

I'm using

var app = new Application();
var pkg = app.LoadFromSqlServer(ConfigurationManager.AppSettings["SSISPackagePath"],
                                ConfigurationManager.AppSettings["SqlHost"],
                                ConfigurationManager.AppSettings["SqlUser"],
                                ConfigurationManager.AppSettings["SqlPass"], null);

to load an SSIS package from sql server for use in an application.

Using the DTS command it requires a /DECRYPT option with password to decrypt the sensitive information stored in the package.

Without the password I get the following error message:

ADO NET Destination has failed to acquire the connection {DB515DE9-B006-4BFC-AC53-ABED0B77183C}. The connection may have been corrupted.

component "ADO NET Destination" (841) failed validation and returned error code 0xC0208452.

How do I pass the decrypt password to the package using C# so it can execute without error?

Was it helpful?

Solution

Have you tried the Application.PackagePassword setter property? Link to documentatation: http://technet.microsoft.com/en-us/library/microsoft.sqlserver.dts.runtime.application.packagepassword.aspx

This method is also mention in this SO question: How can I execute a package with a package password in SSIS through code?
NB according to that link you have to specify the password on the application BEFORE loading the package.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top