千家信息网

SQL SERVER 2008升级到SP4后,服务无法启动

发表于:2026-10-31 作者:千家信息网编辑
千家信息网最后更新 2026年10月31日,为了提高SQL性能和安全性,2号给客户升级SQL 2008 SP4补丁,升级过程中一切顺利。但重启服务器后,发现SQL服务无法启动,事件日志引出此错误:由于升级步骤'sqlagent100_msdb_
千家信息网最后更新 2026年10月31日SQL SERVER 2008升级到SP4后,服务无法启动

为了提高SQL性能和安全性,2号给客户升级SQL 2008 SP4补丁,升级过程中一切顺利。但重启服务器后,发现SQL服务无法启动,事件日志引出此错误:

由于升级步骤'sqlagent100_msdb_upgrade.sql'遇到错误598(状态1,严重性25),因此数据库'master'的脚本级别升级失败。

尝试恢复模板MASTER数据库,修复安装,升级修复都无法解决,后在网上找方案,发现在SQL启动参数中加 ;-T902参数可以启动SQL,并且能成功登录SMSS,步骤如下:

Enable trace flag 902 on the instance of SQL Server 2008 R2. To do this, follow these steps:

Open SQL Server Configuration Manager.

In SQL Server Configuration Manager, click SQL Server Services.

Double-click the SQL Serverservice.

In the SQL Server Properties dialog box, click the Advanced tab.

On click the Advanced tab, locate the Startup Parameters item.

Add ;-T902 to the end of the existing string value, and then click OK.

Right-click the SQL Serverservice, and then click Start.

If the SQL Server Agent service is running, right-click the SQL Server Agent service, and then click Stop.

Open SQL Server Management Studio, and then connect to the instance of SQL Server 2008 R2.

Run the following statements:

EXEC sp_configure 'show advanced', 1;

RECONFIGURE with override ;

EXEC sp_configure 'allow updates', 0;

RECONFIGURE with override ;

EXEC sp_configure 'Agent XPs', 1;

RECONFIGURE with override ;

GO


In SQL Server Configuration Manager, right-click the SQL Serverservice, and then click Stop.

Remove trace flag 902 on the instance of SQL Server 2008 R2. To do this, delete ;-T902 from the string value that you updated in step 1f.

Right-click the SQL Serverservice, and then click Start.

Right-click the SQL Server Agent service, and then click Start.

In SQL Server Management Studio, reconnect to the instance of SQL Server 2008 R2.

In Object Explorer, expand Management, right-click Data Collection, and then click Enable Data Collection.

Note If data collection is already enabled, the Enable Data Collection item is unavailable.


做完以上步骤后,再启动SQL服务,发现服务仍然异常,尝试再加 ;-T902参数并手工运行报错的sqlagent100_msdb_upgrade.sql脚本,发现运行结果有此报错:

对文件 "D:\SQLDATA\temp_MS_AgentSigningCertificate_database.mdf" 的目录查找失败,出现操作系统错误 2(系统找不到指定的文件。)。

发现D:\SQLDATA目录并不存在,于是手工建立SQLDATA目录,再运行脚本,成功完成。再在启动参数中删除;-T902 ,再重新启动服务即可。


也有人的问题略有不同,他操作后,引出了其它错误信息。

从事件里可以看到一个错误信息:

Could not allocate space for object 'dbo.#bulkpackage' in database 'tempdb'

这是由于 tempdb太小造成执行语句失败。

先用;-T902重启 SQL Server之后,把 tempdb文件改大。再删除 ;-T902。重启 SQL Server就行了。



------------------------------------

下面方法好像更简单:

启动 SQL Server 服务启跟踪标志902



一般使用命令: Net Start MSSQL$InstanceName /T902 如果是默认实例 Net Start MSSQLSERVER /T902



C:\Windows\system32>net start MSSQLSERVER /T902


The SQL Server (MSSQLSERVER) service is starting.


The SQL Server (MSSQLSERVER) service was started successfully.


转自:

http://www.cnblogs.com/kerrycode/p/4877910.html


服务 升级 错误 参数 文件 步骤 目录 脚本 成功 事件 信息 手工 数据 数据库 系统 尝试 运行 不同 安全 操作系统 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 咖啡豆 互联网科技行业发展 美国互联网科技巨头监管 互联网 科技公司 广州互联网科技公司 致骋互联网科技 南京欣网互联网科技 丰台科技园 互联网 广州凡科互联网科技 伴你行互联网科技有限公司 深圳艾佳互联网科技 海南购全球互联网科技 承德科技产业互联网发展 互联网金融科技公司干啥的 重庆互联网医院沙龙医盟信息科技 宜昌元轩互联网科技有限公司 互联网科技的全部知识 沐思想互联网科技有限公司 广州百诚互联网科技有限公司官网 南京一网一红互联网科技有限公司 互联网最新的科技 美国互联网科技巨头监管 中国互联网科技发展 亿账通互联网科技 语蝶互联网科技有限公司 速维有品互联网信息科技(苏州)有限公司 链环科技传统企业怎么转型互联网 上海京穆互联网科技有限公司 东营紫格互联网科技 华人运通互联网科技公司
0