Fel 945 och SQL Server-uppgradering misslyckas om SSISDB har konfigurerats med tillgänglighetsgruppen

Den här artikeln hjälper dig att felsöka ett problem som uppstår om en kumulativ uppdatering (CU) eller service pack (SP) för Microsoft SQL Server rapporterar felkod 945 när du kör databasuppgraderingsskript.

Symptom

När du tillämpar en CU eller SP returnerar installationsprogrammet följande felmeddelande:

Väntan på databasmotorns återställningshandtag misslyckades. Mer information om orsaker finns i SQL Server-felloggen.

Dessutom kan följande felpost loggas i SQL Server-felloggen:

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

Orsak

Om sql Server Integration Services-katalogdatabasen (SSISDB) läggs till i en tillgänglighetsgrupp för AlwaysOn (AG) kan skriptuppgradering misslyckas. Uppgraderingsprocessen körs i enanvändarläge. En tillgänglighetsdatabas måste dock vara en databas för flera användare. Under uppgraderingsinstallationen tas därför alla tillgänglighetsdatabaser, inklusive SSISDB, offline och uppgraderas inte.

Mer information finns i Uppgradera SSISDB i en tillgänglighetsgrupp.

Åtgärd

Följ dessa anvisningar för att lösa problemet:

  1. Ta bort SSISDB från tillgänglighetsgruppen.
  2. Kör CU-uppgraderingen på varje nod.
  3. När uppgraderingen är klar återställer du SSISDB till tillgänglighetsgruppen.