星期一, 5月 08, 2017

SQL Agent Job Failed: This error occurs when there is a cryptographic error.

從 DTS 轉移到 SSIS 的排程在執行時發生錯誤,錯誤畫面如下,看起來就像是沒有權限去解密執行,

Description: Failed to decrypt protected XML node "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.  End Error  Error: 2017-05-08 02:00:00.91     Code: 0xC0016016     Source:       Description: Failed to decrypt protected XML node "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.  End Error  Error: 2017-05-08 02:00:00.91     Code: 0xC0016016     Source:       Description: 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.  End Error  Error: 2017-05-08 02:00:01.25     Code: 0xC002F304     


後來應該是我有編輯過,RUN AS 要改成我用來編輯的帳號來執行,因為預設會用該帳號去加密,所以這邊只要設定 Credentials 裡面先建立帳號,再到 SQL Server Agent 設定 Proxy


接著在 Run as 就可以選擇該帳號,執行就可以成功了。


沒有留言: