大网数据广告活动
数据库与应用安全

SQL Server upgrade fails with error code 945 if SSISDB is configured with AG

· 52CE 我爱测

This article resolves an issue in which a cumulative update or service pack for SQL Server reports error 945 when you run database upgrade scripts.

This article helps you troubleshoot an issue that occurs if a cumulative update (CU) or service pack (SP) for Microsoft SQL Server reports error code 945 when you run database upgrade scripts.

Symptoms

When you apply a CU or SP, the Setup program returns the following error message:

Wait on the Database Engine recovery handle failed. Check the SQL Server error log for potential causes.

Additionally, the following error entry might be logged in the SQL Server error log:

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

Cause

If your SQL Server Integration Services catalog database (SSISDB) is added to an Always On Availability Group (AG), the script upgrade can fail. The upgrade process runs in the single-user mode. However, an availability database must be a multi-user database. Therefore, during the upgrade installation, all availability databases, including SSISDB, are taken offline and aren't upgraded.

For more information, see the Upgrading SSISDB in an availability group.

Resolution

To resolve the issue, follow these steps:

  1. Remove SSISDB from the AG.
  2. Run the CU upgrade on each node.
  3. After the upgrade finishes, restore SSISDB to the AG.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 08/17/2023
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。