Search code examples
visual-studio-2012ssissql-server-2012catalog

validation error when project parameter sensitive property is set to true in SSIS 2012


I am using SSIS 2012 and deploying projects via project deployment model. I have 3 project connection managers and passing the password information to the connection manager through a project parameter. When I set the Sensitive property of password parameter to False the package runs fine but when I set it to true it gives the below error :

Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "ConnManager" failed with error code 0xC0202009


Solution

  • It is erroring because you are trying to touch a Parameter that is marked as Sensitive. You cannot use the "old" approach for configuring connection managers. For the project deployment model and Connection managers, in the SSISDB, you right click on the project and select Configure.

    enter image description here

    There is where you overlay a password.

    Otherwise, you then need to use the GetSensitiveValue method to access the value instead of the standard Getter property.

    Dts.Variables["$Package::FtpPassword"].GetSensitiveValue().ToString();
    

    See Matt's article Retrieving the Value of a Sensitive Parameter in a Script