0

I tried to move the file from a local folder to OneDrive (cloud). So, I have to use the Premium File Transfer Task from KingswaySoft (Free Developer License). Then I created the SSIS Package and ran it from the VisualStudio Code it ran successfully. But, Whenever I try to execute the SSIS Package from the SQLServer Job, it shows the following error Message.

Can anyone please give me some suggestions to resolve this issue?

Executed as user: NT Service\SQLSERVERAGENT. Microsoft (R) SQL Server Execute Package Utility Version 16.0.1000.6 for 64-bit Copyright (C) 2022 Microsoft. All rights reserved. Started: 19:39:00 Error: 2024-03-07 19:39:01.28 Code: 0xC0016016 Source: Package
Description: Failed to decrypt protected XML node "TokenFilePassword" 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.
End Error DTExec: The package execution returned DTSER_SUCCESS (0). Started: 19:39:00 Finished: 19:39:02 Elapsed: 1.719 seconds.
The package executed successfully. The step succeeded.

1
  • the message clearly says: Failed to decrypt protected XML node "TokenFilePassword" - lack of permissions maybe? Commented Mar 8 at 7:16

1 Answer 1

0

This is due to permission set at the package and project level. You can set the permission in visual studio by using below steps.

Package level

  1. Right click on the control area of the package to be changed and click properties.
  2. Under security section, you can set the protection level of the package.
  3. It is recommended to use the User key so it is a windows account, but for checking you can give a custom password which can done by selecting Encrypt sensitive with password
  4. After selecting this , the password need to be updated in the Package Password section by clicking the ...

Once it is set at package level the same protection level need to be set at the

Project level

  1. Right click on the Integration project and click properties.
  2. Under Security set the same setup done as above.

Once done you can rebuild the project and see everything is working fine.

After deploying the package, you have to set the password in the sql server agent. For that make sure /DECRYPT password is provided in the command line or fill in the password prompt while clicking any other tabs.

It is also to be noted the job will be running under the login which the SQL Server Agent is configured. So Make sure that login have the necessary rights.

2
  • 1
    Thanks for your answer. Now it's working fine. Commented Mar 27 at 20:59
  • @DineshkumarR if you found my answer helpful , please mark it as answered.
    – Biju jose
    Commented Mar 29 at 3:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.