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

SQL Server upgrade fails with error 4860 when running update database scripts

· 52CE 我爱测

This article discusses error 4860 that causes a SQL Server upgrade to fail when it runs update database scripts.

This article helps you troubleshoot error 4860 that occurs when you install a cumulative update (CU) or service pack (SP) for Microsoft SQL Server. The error occurs when database upgrade scripts are run.

Symptoms

When you install a CU or SP for SQL Server, the Setup program reports the following error:

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

When you check the SQL Server error log, you notice error messages like the following:

Error: 4860, Severity: 16, State: 1.
Cannot bulk load. The file "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Install\SqlTraceCollect.dtsx"<Filename> does not exist.
Error: 912, Severity: 21, State: 2.
Script level upgrade for database 'master' failed because upgrade step 'msdb110_upgrade.sql' encountered error 4860, 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 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.

Cause

This error occurs if a bulk load operation fails when you apply a CU or SP. It occurs because of missing support installation files. For more information about the database upgrade scripts that run during the CU or SP installation, see Troubleshoot upgrade script failures when applying an update.

For example, if Setup can't find SqlTraceCollect.dtsx, it reports an error that resembles the following entry:

Error: 4860, Severity: 16, State: 1.
Cannot bulk load. The file "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Install\SqlTraceCollect.dtsx"

Resolution

To resolve the 4860 error, follow these steps:

  1. Start SQL Server together with trace flag (TF) 902. For more information, see Steps to start SQL with trace flag 902.

  2. Repair the SQL Server installation per the procedure that's documented in Repair a Failed SQL Server Installation. Alternatively, you can copy the missing file from a different system that has the same build as your SQL Server installation, and restore the file on the computer on which the installation is failing.

  3. Remove TF 902 from startup parameters, and then restart SQL Server. After SQL Server starts without TF 902, the upgrade script will run again.

    • If the upgrade script finishes successfully, the SP or CU upgrade is complete. You can check the SQL Server error log and bootstrap folder to verify the completed installation.
    • If the upgrade script fails again, check the SQL Server error log for additional error entries, and then troubleshoot the new errors.

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 01/11/2023
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

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

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