如果 SSISDB 已設定 AG,則錯誤 945 和 SQL Server 升級會失敗
本文可協助您針對當您執行資料庫升級腳本時,Microsoft SQL Server 的累積更新 (CU) 或 Service Pack (SP) 回報錯誤碼 945 時所發生的問題進行疑難解答。
徵兆
當您套用 CU 或 SP 時,安裝程式會傳回下列錯誤訊息:
等候 Database Engine 復原控制代碼失敗。 請檢查 SQL Server 錯誤記錄檔以了解潛在原因。
此外,SQL Server 錯誤記錄檔中可能會記錄下列錯誤專案:
Database 'master' is upgrading script 'SSIS_hotfix_install.sql' from level 201331031 to level 201331592.
Error: 945, Severity: 14, State: 2.
Database 'SSISDB' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.
Error: 912, Severity: 21, State: 2.
Script level upgrade for database 'master' failed because upgrade step 'SSIS_hotfix_install.sql' encountered error 945, state 2, severity 25. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.
Error: 3417, Severity: 21, State: 3.
Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.
SQL Server shutdown has been initiated
原因
如果您的 SQL Server Integration Services 目錄資料庫 (SSISDB) 已新增至 AlwaysOn 可用性群組 (AG),腳本升級可能會失敗。 升級程式會在單一使用者模式中執行。 不過,可用性資料庫必須是多用戶資料庫。 因此,在升級安裝期間,所有可用性資料庫,包括 SSISDB,都會離線且不會升級。
如需詳細資訊,請參閱 升級可用性群組中的 SSISDB。
解決方法
若要解決此問題,請執行下列步驟:
- 從 AG 移除 SSISDB。
- 在每個節點上執行 CU 升級。
- 升級完成後,將 SSISDB 還原至 AG。