码迷,mamicode.com
首页 > 数据库 > 详细

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

时间:2016-06-14 12:09:39      阅读:1038      评论:0      收藏:0      [点我收藏+]

标签:服务器   数据库   安全性   master   follow   

  为了提高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就行了。


本文出自 “石头多的博客” 博客,请务必保留此出处http://dayday.blog.51cto.com/3248/1789021

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

标签:服务器   数据库   安全性   master   follow   

原文地址:http://dayday.blog.51cto.com/3248/1789021

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!