- 工信部備案號 滇ICP備05000110號-1
- 滇公安備案 滇53010302000111
- 增值電信業(yè)務(wù)經(jīng)營許可證 B1.B2-20181647、滇B1.B2-20190004
- 云南互聯(lián)網(wǎng)協(xié)會理事單位
- 安全聯(lián)盟認(rèn)證網(wǎng)站身份V標(biāo)記
- 域名注冊服務(wù)機構(gòu)許可:滇D3-20230001
- 代理域名注冊服務(wù)機構(gòu):新網(wǎng)數(shù)碼
master數(shù)據(jù)庫損壞的解決辦法有哪些
由于sqlserver 2008 master數(shù)據(jù)庫損壞導(dǎo)致sqlserver服務(wù)啟動失敗,本文給大家master數(shù)據(jù)庫損壞的解決辦法,感興趣的朋友一起參考下
SQL Server 2008 master數(shù)據(jù)庫損壞后,SQL SERVER服務(wù)啟動失敗,查看錯誤日志,你會看到下面錯誤信息:
2015-10-27 10:15:21.01 spid6s Starting up database 'master'.
2015-10-27 10:15:23.01 spid6s 錯誤: 9003,嚴(yán)重性: 20,狀態(tài): 1。
2015-10-27 10:15:23.01 spid6s The log scan number (227:418:1) passed to log scan in database 'master' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.
2015-10-27 10:15:23.01 spid6s Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.
如果是數(shù)據(jù)庫版本是中文版,你會看到類似下面的錯誤信息:
傳遞給數(shù)據(jù)庫 'master' 中的日志掃描操作的日志掃描號 (227:418:1) 無效。此錯誤可能指示數(shù)據(jù)損壞,或者日志文件(.ldf)與數(shù)據(jù)文件(.mdf)不匹配。如果此錯誤是在復(fù)制期間出現(xiàn)的,請重新創(chuàng)建發(fā)布。否則,如果該問題導(dǎo)致啟動期間出錯,請從備份還原。
此時解決master數(shù)據(jù)庫的損壞的方法大致有三種:
1: 從備份還原master數(shù)據(jù)庫
還原master數(shù)據(jù)庫的前提是你的master有做備份。千萬謹(jǐn)記,master也必須備份。很多時候,有些人備份時會忽略這些系統(tǒng)數(shù)據(jù)庫。 一般master、msdb備份是必須的。
2: 復(fù)制master數(shù)據(jù)庫模板
如果你沒有master備份,那么退而求次,選擇從安裝目錄的Templates拷貝master數(shù)據(jù)庫文件到對應(yīng)的目錄。如果你SQL SERVER安裝在C盤,沒有修改過安裝路徑,那么可能就是C:Program FilesMicrosoft SQL ServerMSSQL10.MSSQLSERVERMSSQLBinnTemplates
3:重建master數(shù)據(jù)庫
找到SQL Server 2008的安裝介質(zhì)(插入光盤或拷貝介質(zhì)到對應(yīng)目錄),在命令?口將目錄更改為setup.exe文件所在目錄,然后運行下面命令(具體結(jié)合實際情況修改相關(guān)參數(shù))
setup.exe
/QUIET
/
ACTION
=REBUILDDATABASE
/INSTANCENAME=instance_name
/SQLSYSADMINACCOUNTS= accounts
[/SAPWD=
password
]
[/SQLCOLLATION=collation_name]
當(dāng)然有?多細節(jié),如果數(shù)據(jù)庫安裝后打過補丁,做過升級,可能需要重新應(yīng)用這些補丁。
以上內(nèi)容是關(guān)于master數(shù)據(jù)庫損壞的解決辦法,希望對大家有所幫助。
售前咨詢
售后咨詢
備案咨詢
二維碼
TOP