SQL SERVER 2008升级到SP4后,服务无法启动
admin
2023-06-09 10:41:54
0

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

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

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

尝试恢复模板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 ,再重新启动服务即可。

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


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

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

 

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


相关内容

热门资讯

伊朗方面称现阶段伊尚未就核问题... △伊朗首都德黑兰(资料图)总台记者当地时间5月24日获悉,伊朗方面表示,以色列媒体此前关于伊朗在开始...
小米YU7 GT、小米17 M... 5月21日,小米连续发布全新小米YU7家族,新增小米YU7 GT、YU7 标准版两大车型。同场发布的...
持续深耕AI4S创新创业生态 ... 首期科学智能百团百项“科创训练营”近日在沪举办,来自近30个AI4S(AI for Science)...
特朗普:美伊协议“尚未完全谈妥... 新华社华盛顿5月24日电(记者颜亮 徐剑梅)美国总统特朗普24日说,美国和伊朗的协议“尚未完全谈妥”...
大幅升级改造!神舟二十三号飞船... 神舟二十三号飞船出征在即,作为新批次飞船的第二艘飞船,它有哪些改进?承担什么样的任务? 人机界面升...
原创 这... 在自然界,有一些动物通过模仿有毒的、有害的其它动物,来提高生存能力,也有一些动物通过模仿周围的环境来...
Windows竟然藏了一个工具... 快科技5月24日消息,据Neowin报道,Windows系统中有一个鲜为人知的“Windows To...
每天使用手机超过5小时,会发生... 刷手机这事 估计没人能逃得过 上班路上刷几条热搜 吃饭时配一段短视频 睡前躺在床上翻朋友圈、看抖音 ...
硅谷正在流行“氛围办公”:不敲... 这个春天开始,硅谷的办公室里,敲打键盘的哒哒声正在被嘀嘀咕咕的人声取代。 有风险投资人调侃,现在去硅...
抵达!神舟二十三号载人飞船与空... 据中国载人航天工程办公室消息,神舟二十三号载人飞船入轨后,于北京时间2026年5月25日2时45分,...