SSIS包運行出錯信息:
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.
出錯原因:
包的保護級別默認爲 EncryptSensitiveWithUserKey。此設置可以保證只有開發人員可以看到包中的敏感值(如密碼、 用戶名和連接字符串的屬性)。但部署包到服務器後,需要將保護級別更改爲不依靠開發人員用戶密鑰的保護級別。因此,通常需要選擇EncryptSensitiveWithPassword 或EncryptAllWithPassword。通過分配一個生產環境中運營團隊也知道的臨時強密碼來加密包。
解決方法:
- 打開項目中的DTSX文件
- 在空白處點擊右鍵 -> 屬性。
- 將“ProtectionLevel”屬性改爲EncryptSensitiveWithPassword 或EncryptAllWithPassword。
- 設置上一個屬性“PackagePassword”的值爲你自己的密碼。
- 生成該項目,將包拷貝到數據庫服務器上。
- 創建SQL代理作業並設定好步驟以後,點擊“確定”,在彈出的輸入框中輸入剛纔設定的密碼即可。
相關文章
SSIS 包不會運行時調用 SQL Server 代理作業步驟
Failed to decrypt protected XML node "DTS:Password" with error 0x8009000B