SQL SERVER 2008 升级到 SP2后,启动不了

微软处理:http://support.microsoft.com/kb/2163980/en-us


当把 SQL Server升级到 SQL Server 2008 sp2之后,可能会造成 SQL Server启动失败。

查看windows的事件记录。可以找到一个错误:Script level upgrade for database 'master' failed because upgrade step 'sqlagent100_msdb_upgrade.sql' encountered error 15281, 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.

解决方法为:

  1. Enable trace flag 902 on the instance of SQL Server 2008 R2. To do this, follow these steps:
    1. Open SQL Server Configuration Manager.
    2. In SQL Server Configuration Manager, click SQL Server Services.
    3. Double-click the SQL Serverservice.
    4. In the SQL Server Properties dialog box, click the Advanced tab.
    5. On click the Advanced tab, locate the Startup Parameters item.
    6. Add ;-T902 to the end of the existing string value, and then click OK.
  2. Right-click the SQL Serverservice, and then click Start.
  3. If the SQL Server Agent service is running, right-click the SQL Server Agent service, and then click Stop.
  4. Open SQL Server Management Studio, and then connect to the instance of SQL Server 2008 R2.
  5. Run the following statements:
    EXEC sp_configure 'show advanced', 1;
    RECONFIGURE;
    EXEC sp_configure 'allow updates', 0;
    RECONFIGURE;
    EXEC sp_configure 'Agent XPs', 1;
    RECONFIGURE;
    GO
  6. In SQL Server Configuration Manager, right-click the SQL Serverservice, and then click Stop.
  7. 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.
  8. Right-click the SQL Serverservice, and then click Start.
  9. Right-click the SQL Server Agent service, and then click Start.
  10. In SQL Server Management Studio, reconnect to the instance of SQL Server 2008 R2.
  11. 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.

注:

有可能按上面的方法处理后,还是不行。从事件里可以看到一个错误信息:

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

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

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









评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值