Was this page helpful?
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

sys.dm_hadr_auto_page_repair (Transact-SQL)


Applies To: SQL Server 2014, SQL Server 2016 Preview

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. 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.

Applies to: SQL Server (SQL Server 2012 through current version).

Column name

Data type




ID of the database to which this row corresponds.



ID of the file in which the page is located.



ID of the page in the file.



Type of the error. The values can be:

-1 = All hardware 823 errors

1 = 824 errors other than a bad checksum or a torn page (such as a bad page ID)

2 = Bad checksum

3 = Torn page



The status of the page-repair attempt:

2 = Queued for request from partner.

3 = Request sent to partner.

4 = Queued for automatic page repair (response received from partner).

5 = Automatic page repair succeeded and the page should be usable.

6 = Irreparable. This indicates that an error occurred during page-repair attempt, for example, because the page is also corrupted on the partner, the partner is disconnected, or a network problem occurred. This state is not terminal; if corruption is encountered again on the page, the page will be requested again from the partner.



Time of last change to the page status.

Requires VIEW SERVER STATE permission on the server.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft