文章編號: 926070 - 上次校閱: 2009年9月30日 - 版次: 2.0

錯誤訊息可能會記錄在 SQL Server 錯誤記錄檔,在 SQL Server 執行 DBCC 命令之後

系統提示本文適用於您使用的作業系統之外的作業系統。與您不相關的文章內容已停用。
全部展開 | 全部摺疊

徵狀

您在 Microsoft SQL Server 中執行下列的 DBCC 命令其中之一:
  • DBCC checkdb
  • DBCC checkalloc
  • DBCC checktable
  • DBCC checkcatalog
  • DBCC checkfilegroup
執行這項操作以後可能會在 SQL Server 錯誤記錄檔中記錄類似下列的錯誤訊息:
2006-09-01 17:33:24.48 spid54      35 transactions rolled forward in database 'ProductionData' (11). This is an informational message only. No user action is required.
2006-09-01 17:35:39.16 spid54      4 transactions rolled back in database 'ProductionData' (11). This is an informational message only. No user action is required.
2006-09-01 17:36:31.76 spid53      Error: 17053, Severity: 16, State: 1.
2006-09-01 17:36:31.76 spid53      E:\SQLData\ProductionData.mdf:MSSQL_DBCC11: Operating system error 112(There is not enough space on the disk.) encountered.
2006-09-01 17:36:31.76 spid53      Error: 17053, Severity: 16, State: 1.
2006-09-01 17:36:31.76 spid53      E:\ SQLData \ProductionData.mdf:MSSQL_DBCC11: Operating system error 112(There is not enough space on the disk.) encountered.
2006-09-01 17:36:31.77 spid53      Error: 17053, Severity: 16, State: 1.
2006-09-01 17:36:31.77 spid53      E:\ SQLData \ProductionData.mdf:MSSQL_DBCC11: Operating system error 112(There is not enough space on the disk.) encountered.
2006-09-01 17:36:31.80 spid54      DBCC CHECKDB (ProductionData) executed by DomainName\UserName found 0 errors and repaired 0 errors. Elapsed time: 0 hours 3 minutes 19 seconds.
2006-09-01 17:36:31.90 spid53      Error: 17053, Severity: 16, State: 1.
2006-09-01 17:36:31.90 spid53      E:\ SQLData \ProductionData.mdf:MSSQL_DBCC11: Operating system error 112(There is not enough space on the disk.) encountered.
2006-09-01 17:36:31.90 spid53      Error: 17053, Severity: 16, State: 1.
2006-09-01 17:36:31.90 spid53      E:\ SQLData \ProductionData.mdf:MSSQL_DBCC11: Operating system error 112(There is not enough space on the disk.) encountered.
2006-09-01 17:36:32.30 spid54      Error: 926, Severity: 21, State: 6.
2006-09-01 17:36:32.30 spid54      Database 'ProductionData' cannot be opened. It has been marked SUSPECT by recovery. See the SQL Server errorlog for more information.

發生的原因

在 SQL Server DBCC 命令會使用內部的唯讀資料庫快照集。這些資料庫快照集就會在相同的磁碟機對應的資料庫資料檔案的所在位置上建立。資料庫快照集到的 DBCC 命令執行的資料庫中已改變的資料量比例百分比成長。 如果交易式活動會繼續在此資料庫上,DBCC 命令所建立的資料庫快照集可能會遇到磁碟空間問題。因為資料庫快照集檔案與實際的資料檔位於相同的磁碟機上,兩組檔案佔用的磁碟空間。在這種情況下應用程式的交易或使用者交易的偏好。DBCC 所使用的內部資料庫快照集被標示為可疑。因此,DBCC 命令發生錯誤,無法完成。

磁碟空間,是一個內部資料庫快照集的寫入可能會失敗為什麼的原因。其他原因如作業系統錯誤代碼 1450年然後 665 也可以投稿至類似的問題並呈現內部資料庫快照集到可疑的狀態。

狀況說明

這種行為是經過設計規劃的。

其他相關資訊

下列的重要資訊適用於 < 徵狀 > 一節中所述的錯誤訊息:
  • 這些錯誤訊息是來自不同的作用中伺服器處理序識別碼 (SPID)。SPID 54 是執行 DBCC 命令工作階段識別碼。SPID 53 是執行使用者交易工作階段識別碼。
  • 這些錯誤訊息指出循環順向的交易,並復原交易。在初始的 DBCC 命令的執行階段產生這些訊息。當您執行 DBCC 命令時,DBCC 命令首先會嘗試建立內部的快照集。建立快照集時對這個快照集,將快照集帶到一致的狀態執行資料庫復原。錯誤訊息會反映這項活動。
  • 錯誤訊息 926 指出資料庫標示為可疑。內部的快照集而不是實際的資料庫,實際上是指此錯誤訊息。資料庫的狀態是 「 線上 」,並且功能可發揮資料庫。
  • 錯誤訊息 17053 包含在 NTFS 檔案系統替代資料流在用於內部的快照集的名稱。這一錯誤訊息指出問題的真正的原因。
  • 內部資料庫快照集實際的資料庫使用相同的名稱。因此,這些錯誤訊息會包含資料庫的名稱。
  • 雖然錯誤記錄檔訊息指示 DBCC CHECKDB 完成,它應該被視為異常終止。您應該重新執行 DBCC CHECKDB 命令,以允許它執行直到完成存取之資料庫的一致性。在這些情況參照輸出從 DBCC CHECKDB 命令傳送回給用戶端以瞭解哪些物件已存回和以初始狀態報告。
如需有關這個問題的詳細資訊,請參閱 SQL Server 線上叢書 》 中的下列主題]:
  • DBCC 內部資料庫快照集使用方式
  • 瞭解疏鬆檔案的大小,請在資料庫快照集
請遵循 < 若要避免空間使用狀況問題這些主題提供的步驟。修正任何問題後重新執行 DBCC 命令。

除了所 < 徵狀 > 一節中所述的錯誤訊息,可能會收到下列錯誤訊息:
訊息 5128,層級 17、 狀態 2,行 6
寫入至疏鬆檔案 'E:\CreateFile\ProductionData.mdf:MSSQL_DBCC11' 失敗,因為缺乏磁碟空間。
在這種情況下執行 DBCC 命令的用戶端應用程式將會有下列項目在結果中的應用程式設定:
DBCC 結果 'ProductionData'。
CHECKDB 在資料庫 'ProductionData' 中找到 0 配置錯誤和 0 的一致性錯誤。
msg 926]、 [層級 21]、 [狀態 6]、 [第 1 行
無法開啟資料庫 'ProductionData'。它已由復原標示為可疑。SQL Server 錯誤記錄檔,如需詳細資訊,請參閱。
訊息 0、 層級 20、 狀態 0、 行 0
目前的命令發生嚴重的錯誤。 結果如果有任何,應該會被捨棄。
如果無法完全建立快照集,就會收到類似下列 DBCC 命令會發出用戶端應用程式中的錯誤訊息:
msg 1823,層級 16,狀態 1,行 1
無法建立資料庫快照集,因為它無法啟動。
msg 7928,層級 16,狀態 1,行 1
無法建立資料庫快照集用於線上檢查。可能是原因已列在先前的錯誤,或其中一個基礎的磁碟區不支援疏鬆檔案或替代資料流。嘗試取得獨佔存取權離線執行檢查。
訊息 5030、 層級 16,狀態 12、 行 1
資料庫無法以獨佔模式鎖定執行這項作業。
msg 7926,層級 16,狀態 1,行 1
檢查陳述式已中止。資料庫不檢查,無法建立資料庫快照集並無法鎖定資料庫或資料表。如需詳細資訊的預期這個行為會和什麼因應措施存在,請參閱線上叢書 》。也請參閱先前的錯誤,如需詳細資訊。
訊息 5106,層級 17、 狀態 2,行 1
寫入至疏鬆檔案 'E:\Data\LogFUllTest_Data.mdf:MSSQL_DBCC10' 失敗,因為缺乏磁碟空間。
如果內部資料庫快照集執行到 1450年或 665 錯誤,以下是您會注意到在 SQL Server 錯誤記錄檔中的一般順序:
2008-05-21 13:03:45.67 spid500     272 transactions rolled forward in database 'MYDATABASE' (12). This is an informational message only. No user action is required.
2008-05-21 13:03:45.84 spid500     2 transactions rolled back in database 'MYDATABASE' (12). This is an informational message only. No user action is required.
2008-05-21 13:03:46.97 spid500     Recovery completed for database MYDATABASE (database ID 12) in 5 second(s) (analysis 602 ms, redo 3954 ms, undo 105 ms.) This is an informational message only. No user action is required.
2008-05-21 13:36:48.25 spid480     The operating system returned error 665(The requested operation could not be completed due to a file system limitation) to SQL Server during a write at offset 0x00001b35138000 in file 'I:\MSSQL\DATA\mscrm_data1.ndf:MSSQL_DBCC12'.
2008-05-21 13:36:48.26 spid480     Error: 17053, Severity: 16, State: 1.
2008-05-21 13:36:48.26 spid480     C:\MSSQL\DATA\MyDatabase.mdf:MSSQL_DBCC12: Operating system error 665(The requested operation could not be completed due to a file system limitation) encountered.
2008-05-21 13:36:48.27 spid480     The operating system returned error 665(The requested operation could not be completed due to a file system limitation) to SQL Server during a write at offset 0x00001b35138000 in file 'C:\MSSQL\DATA\MyDatabase.mdf:MSSQL_DBCC12'. 
2008-05-21 13:36:48.27 spid480     Error: 17053, Severity: 16, State: 1.
2008-05-21 13:36:48.27 spid480     C:\MSSQL\DATA\MyDatabase.mdf:MSSQL_DBCC12: Operating system error 665(The requested operation could not be completed due to a file system limitation) encountered.
2008-05-21 13:36:48.37 spid480     The operating system returned error 665(The requested operation could not be completed due to a file system limitation) to SQL Server during a write at offset 0x00001b35138000 in file 'C:\MSSQL\DATA\MyDatabase.mdf:MSSQL_DBCC12'. 
2008-05-21 13:36:48.37 spid480     Error: 17053, Severity: 16, State: 1.
2008-05-21 13:36:48.37 spid480     C:\MSSQL\DATA\MyDatabase.mdf:MSSQL_DBCC12: Operating system error 665(The requested operation could not be completed due to a file system limitation) encountered.
2008-05-21 13:36:48.37 spid500     DBCC CHECKDB (MYDATABASE) executed by DomainName\UserName found 0 errors and repaired 0 errors. Elapsed time: 0 hours 33 minutes 16 seconds.  Internal database snapshot has split point LSN = 0000759c:002547bc:0040 and first LSN = 0000759c:0023696d:0049.  This is an informational message only. No user action is required.

這篇文章中的資訊適用於:
  • Microsoft SQL Server 2008 Developer
  • Microsoft SQL Server 2008 Enterprise
  • Microsoft SQL Server 2008 Express
  • Microsoft SQL Server 2008 Express with Advanced Services
  • Microsoft SQL Server 2008 Standard
  • Microsoft SQL Server 2008 Standard Edition for Small Business
  • Microsoft SQL Server 2008 Web
  • Microsoft SQL Server 2008 Workgroup
  • Microsoft SQL Server 2005 Developer Edition
  • Microsoft SQL Server 2005 Enterprise Edition
  • Microsoft SQL Server 2005 Standard Edition
  • Microsoft SQL Server 2005 Workgroup Edition
  • Microsoft SQL Server 2005 Express Edition
  • Microsoft SQL Server 2005 Standard X64 Edition
  • Microsoft SQL Server 2005 Standard Edition for Itanium Based Systems
  • Microsoft SQL Server 2005 Enterprise X64 Edition
  • Microsoft SQL Server 2005 Enterprise Edition for Itanium Based Systems
關鍵字:?
kbmt kbexpertiseadvanced kbtshoot kbsql2005engine kbprb KB926070 KbMtzh
機器翻譯機器翻譯
重要:本文是以 Microsoft 機器翻譯軟體翻譯而成,而非使用人工翻譯而成。Microsoft 同時提供使用者人工翻譯及機器翻譯兩個版本的文章,讓使用者可以依其使用語言使用知識庫中的所有文章。但是,機器翻譯的文章可能不盡完美。這些文章中也可能出現拼字、語意或文法上的錯誤,就像外國人在使用本國語言時可能發生的錯誤。Microsoft 不為內容的翻譯錯誤或客戶對該內容的使用所產生的任何錯誤或損害負責。Microsoft也同時將不斷地就機器翻譯軟體進行更新。
按一下這裡查看此文章的英文版本:926070? (http://support.microsoft.com/kb/926070/en-us/ )
Microsoft及(或)其供應商不就任何在本伺服器上發表的文字資料及其相關圖表資訊的恰當性作任何承諾。所有文字資料及其相關圖表均以「現狀」供應,不負任何擔保責任。Microsoft及(或)其供應商謹此聲明,不負任何對與此資訊有關之擔保責任,包括關於適售性、適用於某一特定用途、權利或不侵權的明示或默示擔保責任。Microsoft及(或)其供應商無論如何不對因或與使用本伺服器上資訊或與資訊的實行有關而引起的契約、過失或其他侵權行為之訴訟中的特別的、間接的、衍生性的損害或任何因使用而喪失所導致的之損害、資料或利潤負任何責任。