SQL Server-uppgradering från SQL Server 2014 eller SQL Server 2016 till 2017 misslyckas och returnerar fel 1712

Den här artikeln hjälper dig att felsöka och lösa problemet med att uppgradera antingen en SQL Server 2016- eller SQL Server 2014 till SQL Server 2017-rapporter 1712 när du kör databasuppgraderingsskript.

Symptom

Uppgradering till en SQL Server 2017-instans kan misslyckas när du kör uppgraderingsskriptet ISServer_upgrade.sql med följande fel:

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

När du kontrollerar SQL Server-felloggen ser du någon av följande felposter:

2020-10-26 10:08:09.94 spid6s      Database 'master' is upgrading script 'ISServer_upgrade.sql' from level 0 to level 500. 
2020-10-26 10:08:09.94 spid6s      --------------------------------------------- 
2020-10-26 10:08:09.94 spid6s      Starting execution of ISServer_upgrade.SQL 
2020-10-26 10:08:09.94 spid6s      --------------------------------------------- 
2020-10-26 10:08:09.94 spid6s        
2020-10-26 10:08:09.94 spid6s      Taking SSISDB to single user mode 
2020-10-26 10:08:09.94 spid6s      Setting database option SINGLE_USER to ON for database 'SSISDB'. 
2020-10-26 10:08:10.47 spid6s      Error: 1712, Severity: 16, State: 1. 
2020-10-26 10:08:10.47 spid6s      Online index operations can only be performed in Enterprise edition of SQL Server. 
2020-10-26 10:08:10.47 spid6s      Error: 917, Severity: 15, State: 1. 
2020-10-26 10:08:10.47 spid6s      An upgrade script batch failed to execute for database 'master' due to compilation error. Check the previous error message for the line which caused compilation to fail. 
2020-10-26 10:08:10.47 spid6s      Error: 912, Severity: 21, State: 2. 
2020-10-26 10:08:10.47 spid6s      Script level upgrade for database 'master' failed because upgrade step 'ISServer_upgrade.sql' encountered error 917, state 1, severity 15. 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. 
2020-10-26 10:08:10.48 spid6s      Error: 3417, Severity: 21, State: 3. 
2020-10-26 10:08:10.48 spid6s      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. 
2020-10-26 10:08:10.48 spid6s      SQL Server shutdown has been initiated 
2020-10-26 10:08:10.48 spid6s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required. 
2020-10-26 10:08:10.50 spid15s     The SQL Server Network Interface library successfully deregistered the Service Principal Name (SPN) [ MSSQLSvc/SAFHSQL01.SAFEHAVEN.com ] for the SQL Server service. 
2020-10-26 10:08:10.50 spid15s     The SQL Server Network Interface library successfully deregistered the Service Principal Name (SPN) [ MSSQLSvc/SAFHSQL01.SAFEHAVEN.com:1433 ] for the SQL Server service.

Orsak

SQL Server 2017 release to manufacture (RTM) upgrade script includes a dynamic link library (DLL) that runs online index operations for all editions of SQL Server although only the Enterprise and Developer editions support this feature( SQL Server 2017 release to manufacture (RTM) upgrade script includes a dynamic link library (DLL) that runs online index operations for all editions of SQL Server although only the Enterprise and Developer editions support this feature. Mer information om skript för databasuppgradering finns i Felsöka fel med uppgraderingsskript när du tillämpar en uppdatering.

Åtgärd

Lös 1712-felet genom att följa dessa steg:

  1. Starta SQL Server tillsammans med spårningsflaggan (TF) 902. Mer information finns i Steg för att starta SQL med spårningsflagga 902.

    Kommentar

    Eftersom det här felet uppstår efter uppgraderingen av binärfiler kommer SQL Server-databasmotorn redan att finnas på RTM-nivå för SQL Server 2017 och du kan fortfarande starta instansen med TF 902.

  2. Installera en version av SQL Server som är SQL Server 2017 CU5 eller senare.

  3. Ta bort TF 902 från startparametrarna och starta sedan om SQL Server.

  4. När SQL Server startar utan TF 902 körs uppgraderingsskriptet igen.

    • Om uppgraderingsskriptet har slutförts slutförs uppgraderingen av Service Pack (SP) eller Kumulativ uppdatering (CU). Du kan kontrollera SQL Server-felloggen och bootstrap-mappen för att verifiera den slutförda installationen.

    • Om uppgraderingsskriptet misslyckas igen kontrollerar du felloggen för SQL Server för ytterligare felposter och felsöker sedan de nya felen.