次の方法で共有


SQL Server 2014 または SQL Server 2016 から 2017 への SQL Server のアップグレードが失敗し、エラー 1712 が返される

この記事は、SQL Server 2016 または SQL Server 2014 を SQL Server 2017 にアップグレードすると、データベース アップグレード スクリプトの実行中に 1712 が報告される問題のトラブルシューティングと解決に役立ちます。

現象

SQL Server 2017 インスタンスへのアップグレードは、次のエラーで ISServer_upgrade.sql アップグレード スクリプトの実行中に失敗する可能性があります。

データベース エンジンの復旧ハンドルの待機に失敗しました。 考えられる原因については、SQL Server エラー ログを確認してください

SQL Server エラー ログを確認すると、次のいずれかのエラー エントリが表示されます。

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.

原因

製造用 SQL Server 2017 リリース (RTM) アップグレード スクリプトには、SQL Server のすべてのエディションに対してオンライン インデックス操作を実行するダイナミック リンク ライブラリ (DLL) が含まれていますが、この機能は Enterprise および Developer エディションでのみサポートされています。 データベース アップグレード スクリプトの詳細については、「 更新プログラムの適用時のアップグレード スクリプトの失敗をトラブルシューティングするを参照してください。

解決方法

1712 エラーを解決するには、次の手順に従います。

  1. トレース フラグ (TF) 902 と共に SQL Server を起動します。 詳細については、「 トレース フラグ 902 で SQL を開始する手順を参照してください。

    Note

    バイナリのアップグレード後にこのエラーが発生すると、SQL Server データベース エンジンは既に SQL Server 2017 RTM レベルになり、TF 902 でインスタンスを起動できます。

  2. SQL Server 2017 CU5 以降 SQL Server のビルド インストールします。

  3. スタートアップ パラメーターから TF 902 を削除し、SQL Server を再起動します。

  4. TF 902 なしで SQL Server が起動すると、アップグレード スクリプトが再度実行されます。

    • アップグレード スクリプトが正常に完了すると、Service Pack (SP) または累積的な更新プログラム (CU) のアップグレードが完了します。 SQL Server エラー ログとブートストラップ フォルダーを確認して、完了したインストールを確認できます。

    • アップグレード スクリプトが再度失敗した場合は、SQL Server エラー ログで追加のエラー エントリを確認し、新しいエラーのトラブルシューティングを行います。