Download the SSIS package using Application.LoadFromSqlServer () with an encrypted connection string

I use

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

download the SSIS package from the sql server for use in the application.

Using the DTS command to decrypt confidential information stored in a packet, the /DECRYPT option with a password is required.

Without a password, I get the following error message:

ADO NET Destination failed to get connection {DB515DE9-B006-4BFC-AC53-ABED0B77183C}. The connection may be damaged.

component "ADO NET Destination" (841) did not pass the test and returned error code 0xC0208452.

How to pass decryption password to a package using C # so that it runs without errors?

+4
source share
1 answer

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

This method is also mentioned in this SO question: How can I execute a packet with a packet password in SSIS through code?
NB, in accordance with this link, you must specify the password in the application BEFORE downloading the package.

+1
source

All Articles