您好,登錄后才能下訂單哦!
為了提高SQL性能和安全性,2號(hào)給客戶升級(jí)SQL 2008 SP4補(bǔ)丁,升級(jí)過程中一切順利。但重啟服務(wù)器后,發(fā)現(xiàn)SQL服務(wù)無法啟動(dòng),事件日志引出此錯(cuò)誤:
由于升級(jí)步驟'sqlagent100_msdb_upgrade.sql'遇到錯(cuò)誤598(狀態(tài)1,嚴(yán)重性25),因此數(shù)據(jù)庫'master'的腳本級(jí)別升級(jí)失敗。
嘗試恢復(fù)模板MASTER數(shù)據(jù)庫,修復(fù)安裝,升級(jí)修復(fù)都無法解決,后在網(wǎng)上找方案,發(fā)現(xiàn)在SQL啟動(dòng)參數(shù)中加 ;-T902參數(shù)可以啟動(dòng)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.
做完以上步驟后,再啟動(dòng)SQL服務(wù),發(fā)現(xiàn)服務(wù)仍然異常,嘗試再加 ;-T902參數(shù)并手工運(yùn)行報(bào)錯(cuò)的sqlagent100_msdb_upgrade.sql腳本,發(fā)現(xiàn)運(yùn)行結(jié)果有此報(bào)錯(cuò):
對(duì)文件 "D:\SQLDATA\temp_MS_AgentSigningCertificate_database.mdf" 的目錄查找失敗,出現(xiàn)操作系統(tǒng)錯(cuò)誤 2(系統(tǒng)找不到指定的文件。)。
發(fā)現(xiàn)D:\SQLDATA目錄并不存在,于是手工建立SQLDATA目錄,再運(yùn)行腳本,成功完成。再在啟動(dòng)參數(shù)中刪除;-T902 ,再重新啟動(dòng)服務(wù)即可。
也有人的問題略有不同,他操作后,引出了其它錯(cuò)誤信息。
從事件里可以看到一個(gè)錯(cuò)誤信息:
Could not allocate space for object 'dbo.#bulkpackage' in database 'tempdb'
這是由于 tempdb太小造成執(zhí)行語句失敗。
先用;-T902重啟 SQL Server之后,把 tempdb文件改大。再刪除 ;-T902。重啟 SQL Server就行了。
------------------------------------
下面方法好像更簡(jiǎn)單:
啟動(dòng) SQL Server 服務(wù)啟跟蹤標(biāo)志902
一般使用命令: Net Start MSSQL$InstanceName /T902 如果是默認(rèn)實(shí)例 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.
轉(zhuǎn)自:
http://www.cnblogs.com/kerrycode/p/4877910.html
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。