Monday 8 October 2018

EncryptSensitiveWithUserKey protection level in SSIS

If we select this option, it encrypts the sensitive information using the current user settings. Current user means windows user where the package is running.
Let’s see the example
Taking data flow task
 
Now I am taking OLEDB
Creating a connection
 

Using SQL server authentication. Click ok.
Select the source

Click ok.
Now we need to set the protection level to EncryptSensitiveWithUserKey on the package.
Click on the package property
  
 
Now we need to set protection level on the project level.
  
 
 
See the source code of this package.
 

Here password is encrypted with the user key. This package is created under the user BAGESH.
   
 
Now I am running this package.
  
 
 
The package is executed successfully.
Now I am trying to open this package in another account.
 

When I am opening this package getting below warning messages.
   

While I am loading the package getting below error.
   

See below   

Error seems that “Key not valid for use in specified state”
Severity               Code     Description         Project File         Line        Suppression State
Error                      Error loading Package.dtsx: Failed to decrypt protected XML node "DTS: Password" with error 0x8009000B "Key not valid for use in specified state.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available.                                I:\SSIS Test\Integration Services Project1\Integration Services Project1\Package.dtsx

No comments:

Post a Comment

If you have any doubt, please let me know.

Popular Posts