sys.dm_hadr_auto_page_repair (Transact-SQL)sys.dm_hadr_auto_page_repair (Transact-SQL)

適用範圍:Applies to: 是SQL ServerSQL Server (所有支援的版本) yesSQL ServerSQL Server (all supported versions) 適用範圍:Applies to: 是SQL ServerSQL Server (所有支援的版本) yesSQL ServerSQL Server (all supported versions)

針對可用性複本上的任何可用性資料庫進行的每個自動修復頁面嘗試行為,各傳回一個資料列,該可用性複本是針對伺服器執行個體的任何可用性群組所裝載。Returns a row for every automatic page-repair attempt on any availability database on an availability replica that is hosted for any availability group by the server instance. 這個檢視包含在給定之主要或次要資料庫上進行最新自動修復頁面嘗試行為的資料列,而且每個資料庫最多 100 個資料列。This view contains rows for the latest automatic page-repair attempts on a given primary or secondary database, with a maximum of 100 rows per database. 一旦資料庫到達上限時,下一個自動修復頁面嘗試行為的資料列就會取代其中一個現有的項目。As soon as a database reaches the maximum, the row for its next automatic page-repair attempt replaces one of the existing entries.

下表定義各資料行的意義:The following table defines the meaning of the various columns:

資料行名稱Column name 資料類型Data type 描述Description
database_iddatabase_id intint 這個資料列所對應的資料庫識別碼。ID of the database to which this row corresponds.
file_idfile_id intint 頁面所在之檔案的識別碼。ID of the file in which the page is located.
page_idpage_id bigintbigint 檔案中頁面的識別碼。ID of the page in the file.
error_typeerror_type intint 錯誤的類型。Type of the error. 其值可能是:The values can be:

- 1 = 所有硬體823錯誤- 1 = All hardware 823 errors

1 = 總和檢查碼錯誤或頁面損毀 (例如,頁面識別碼不正確) 以外的 824 錯誤1 = 824 errors other than a bad checksum or a torn page (such as a bad page ID)

2 = 總和檢查碼錯誤2 = Bad checksum

3 = 頁面損毀3 = Torn page
page_statuspage_status intint 修復頁面嘗試行為的狀態:The status of the page-repair attempt:

2 = 已將夥伴的要求排入佇列。2 = Queued for request from partner.

3 = 要求已傳送給夥伴。3 = Request sent to partner.

4 = 已成功修復頁面。4 = Page was successfully repaired.

5 = 在上次嘗試/自動頁面修復期間無法修復頁面,將會再次嘗試修復頁面。5 = The page could not be repaired during the last attempt/ Automatic page repair will attempt to repair the page again.
modification_timemodification_time datetimedatetime 上次變更頁面狀態的時間。Time of last change to the page status.



需要伺服器的 VIEW SERVER STATE 權限。Requires VIEW SERVER STATE permission on the server.

另請參閱See Also

自動修復頁面 (可用性群組:資料庫鏡像) Automatic Page Repair (Availability Groups: Database Mirroring)
suspect_pages (Transact-sql) suspect_pages (Transact-SQL)
管理 suspect_pages 資料表 (SQL Server)Manage the suspect_pages Table (SQL Server)