修復損壞的 MS SQL 主資料庫 - 無法存取 SQL 用戶端

修復損壞的 MS SQL 主資料庫 - 無法存取 SQL 用戶端

對任何重複表示歉意,但我覺得我在第一個障礙上就跌倒了。

我有一個 MS SQL 2005 伺服器,它拒絕啟動,而且我沒有密碼(包括“sa”密碼),顯然是因為主資料庫已損壞(請參閱日誌)。我透過谷歌搜尋錯誤訊息(見下文)找到了大量說明,例如,但它們似乎都首先涉及能夠運行 SQL 命令。

運行sqlcmd並輸入SELECT * FROM sys.configurationsp; (return)(按照連結 1)不會產生任何輸出。運行sqlcmd -S DVTEL(其中 DVTEL 是配置管理器中的 SQL Server 服務之一)因連線逾時而失敗。

錯誤訊息:

從設定管理員啟動伺服器時:Could not start the SQL Server (DVTEL) on Local Computer. For more info, review the system event log. 或者:

> NET START MSSQL$DVTEL /F /T3608 The SQL Server (DVTEL) service is starting. The SQL Server (DVTEL) service could not be started. A system error has occurred. System error 1067 has occurred. The process terminated unexpectedly.

錯誤日誌:

2015-06-22 09:42:06.78 Server (c) 2005 Microsoft Corporation. 2015-06-22 09:42:06.78 Server All rights reserved. 2015-06-22 09:42:06.78 Server Server process ID is 2896. 2015-06-22 09:42:06.78 Server Authentication mode is MIXED. 2015-06-22 09:42:06.78 Server Logging SQL Server messages in file 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL.2\MSSQL\LOG\ERRORLOG'. 2015-06-22 09:42:06.78 Server This instance of SQL Server last reported using a process ID of 1340 at 22/06/2015 09:26:16 (local) 22/06/2015 08:26:16 (UTC). This is an informational message only; no user action is required. 2015-06-22 09:42:06.78 Server Registry startup parameters: 2015-06-22 09:42:06.78 Server -d C:\Program Files (x86)\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\master.mdf 2015-06-22 09:42:06.78 Server -e C:\Program Files (x86)\Microsoft SQL Server\MSSQL.2\MSSQL\LOG\ERRORLOG 2015-06-22 09:42:06.78 Server -l C:\Program Files (x86)\Microsoft SQL Server\MSSQL.2\MSSQL\DATA\mastlog.ldf 2015-06-22 09:42:06.78 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required. 2015-06-22 09:42:06.78 Server Detected 4 CPUs. This is an informational message; no user action is required. 2015-06-22 09:42:06.95 Server Error: 8313, Severity: 16, State: 1. 2015-06-22 09:42:06.95 Server Error in mapping SQL Server performance object/counter indexes to object/counter names. SQL Server performance counters are disabled. 2015-06-22 09:42:06.95 Server Error: 3409, Severity: 16, State: 1. 2015-06-22 09:42:06.95 Server Performance counter shared memory setup failed with error -1. Reinstall sqlctr.ini for this instance, and ensure that the instance login account has correct registry permissions. 2015-06-22 09:42:06.99 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required. 2015-06-22 09:42:07.01 Server Database mirroring has been enabled on this instance of SQL Server. 2015-06-22 09:42:07.01 spid5s Starting up database 'master'. 2015-06-22 09:42:07.07 spid5s Error: 9003, Severity: 20, State: 1. 2015-06-22 09:42:07.07 spid5s The log scan number (288:224: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-06-22 09:42:07.07 spid5s 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.

相關內容