SQL Server 升級失敗,並傳回錯誤 6528
本文可協助您針對 Microsoft SQL Server 安裝累積更新 (CU) 或 Service Pack (SP) 時所發生的錯誤 6528 進行疑難解答和解決。 執行資料庫升級文本時發生錯誤。
徵兆
當您套用 CU 或 SQL Server 的 SP 時,您會發現安裝程式會在 SQL Server 錯誤記錄檔中報告下列其中一個錯誤訊息:
SQL server failed in 'Script level upgrade' with the following error:
Error: 50000, Severity: 16, State: 127.
Cannot drop the assembly 'ISSERVER', because it does not exist or you do not have permission.
Error: 50000, Severity: 16, State: 127.
Cannot drop the assembly 'ISSERVER', because it does not exist or you do not have permission.
Creating function internal.is_valid_name
Error: 6528, Severity: 16, State: 1.
Assembly 'ISSERVER' was not found in the SQL catalog of database 'SSISDB'.
Error: 912, Severity: 21, State: 2.
Script level upgrade for database 'master' failed because upgrade step 'ISServer_upgrade.sql' encountered error 6528, state 1, severity 16. 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 error log 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.
原因
因為您嘗試套用 CU 或 SP 的 SQL Server 實例缺少元件 ISSERVER
,因此可能會發生此問題。
如需在 CU 或 SP 安裝期間執行之資料庫升級腳本的詳細資訊,請參閱 針對套用更新時的升級腳本失敗進行疑難解答。
解決方法
請遵循下列步驟來解決問題:
使用 追蹤旗標 902 啟動 SQL Server。
使用下列查詢檢查元件
ISSERVER
是否在資料庫中SSISDB
:Use SSISDB GO SELECT * FROM sys.assemblies WHERE name = 'ISSERVER'
或者,您可以藉由在 SQL Server Management Studio (SSMS) 中展開資料庫>SSISDB>可程式性>元件>ISSERVER 來檢查它。
檢查 C:\Program Files\Microsoft SQL Server\<VersionNumber>\DTS\Bin 的位置,以查看 SQL 二進位資料夾中是否有元件Microsoft.SqlServer.IntegrationServices.Server.dll。
如果元件位於該資料夾中,但遺漏為 sys.assemblies 檢視中的專案,請使用下列查詢重新建立它:
DECLARE @asm_bin varbinary(max); SELECT @asm_bin = BulkColumn FROM OPENROWSET (BULK N'C:\Program Files\Microsoft SQL Server\<VersionNumber>\DTS\Binn\Microsoft.SqlServer.IntegrationServices.Server.dll',SINGLE_BLOB) AS dll CREATE ASSEMBLY ISSERVER FROM @asm_bin WITH PERMISSION_SET = UNSAFE ALTER DATABASE SSISDB SET TRUSTWORTHY ON
這次元件
ISSERVER
存在。拿掉追蹤旗標 902 並啟動服務。