Failed to decrypt protected XML node ServerPassword with error 0x8009000B

Why do I get the following error when executing a package under a SQL Server Agent job: "Failed to decrypt protected XML node "ServerPassword" with error 0x8009000B..."?

The Execute method on the task returned error code 0x80004003 (Object reference not set to an instance of an object.). The Execute method must succeed, and indicate the result using an "out" parameter.
... and also:
Failed to decrypt protected XML node "ServerPassword" 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.


The default package protection level, EncryptSensitiveWithUserKey, doesn't work very well with SQL Server Agent jobs. This option only works when you use the same exact user account to execute the package under the SQL Server Job Agent as you used to design the package. Alternatively, you may configure it to use a proxy account.

We recommend that you use EncryptSensitiveWithPassword.  If you want to set up package encryption with either EncryptAllWithPassword or EncryptSensitiveWithPassword, be sure to include the package decryption parameter. You will need to consult Microsoft documentation for a better understanding of how to set the /DECRYPT option with password in the DTEXEC command line. Information about the DTEXEC command line options is available here.

In the image below, you can see that in the SQL Server Agent job step, there is a /DECRYPT option to specify the password you gave the package in Visual Studio


If you choose to use the option DontSaveSensitive, all sensitive information like passwords is completely removed from the package. This option can only be used if you provide your passwords from an external configuration file or a table.

You may find the following articles useful: 

Securing Your SSIS Packages Using Package Protection Level

Access Control for Sensitive Data in Packages






    Book a Presales Call


    Are you new to COZYROC and evaluating our solutions? 
    Book a Presales Call with us now and get 5% off SSIS+.