A hard drive failure occurred earlier this week on one of our SQL 2000 servers. I am not surprised that a data integrity issue occurred even though there's no clear reason why it happened to this specific table (no transactions should have been pending on it at the time of failure).
We had a query return this error:
Location: R:\sql\ntdbms\storeng\drs\
include\re
cord.inl:1
447
Expression: m_SizeRec > 0 && m_SizeRec <= MAXDATAROW
SPID: 70
Process ID: 2976
Msg 3624, Level 20, State 1, Line 1
I decided to check each table involved in the query and I determined it was one specific table named IssuesAndReceipts in a database called Oracle on our SQL Server 2000 database. I determined this by running a "sounding" query that I suspected would cause a table scan (rather than hitting the clustered index). I received this error:
Msg 605, Level 21, State 1, Line 1
Attempt to fetch logical page (1:2333320) in database 'Oracle' belongs to object '1628547397', not to object 'IssuesAndReceipts'.
... So IssuesAndReceipts is claiming a page that is not "his"?
I ran DBCC CHECKTABLE on it and received the output that I pasted at the end of this message. I'm no expert but I assume from the above error that IssuesAndReceipts has a page of data that really belongs to another table that has a different number of bytes on its record. Note that I will run the more comprehensive DBCC CHECKDB on this database.
I do not want to restore a backup of the database. I do not view this as a catastrophic enterprise-killing issue so I do not want to lose updates and activity that has occurred on the database since the failure. I'd rather surgically repair this IssuesAndReceipts table by doing the REPAIR ALLOW DATA LOSS thing and then uploading a replacement for the discarded errant data.
* * My Question: Is there any way to physically view the "page"? I know it may look like garbage but if I can recognize certain elements of the data I hope I could determine a) if something was overwritten in IssuesAndReceipts, b) what data to reupload.
Thanks in advance for any assistance / pointers to online resources.
DBCC CHECKTABLE ('IssuesAndReceipts') -- output:
DBCC results for 'IssuesAndReceipts'.
Msg 8928, Level 16, State 1, Line 4
Object ID 536441035, index ID 0: Page (1:3797015) could not be processed. See other errors for details.
Msg 8944, Level 16, State 2, Line 4
Table error: Object ID 536441035, index ID 0, page (1:3797015), row 1. Test (!(hdr->r_tagA & (VERSION_MASK | RECTAG_RESV_A | RECTAG_RESV_B))) failed. Values are 1 and 193.
Msg 8944, Level 16, State 4, Line 4
Table error: Object ID 536441035, index ID 0, page (1:3797015), row 1. Test (offsetNull >= BASEOFFSET) failed. Values are 0 and 4.
Msg 8928, Level 16, State 1, Line 4
Object ID 536441035, index ID 0: Page (1:4118032) could not be processed. See other errors for details.
Msg 8944, Level 16, State 17, Line 4
Table error: Object ID 536441035, index ID 0, page (1:4118032), row 0. Test (columnOffsets->offTbl [varColumnNumber] <= (nextRec - pRec)) failed. Values are 92 and 89.
Msg 8928, Level 16, State 1, Line 4
Object ID 536441035, index ID 5: Page (1:2333320) could not be processed. See other errors for details.
Msg 8928, Level 16, State 1, Line 4
Object ID 536441035, index ID 5: Page (1:2333321) could not be processed. See other errors for details.
Msg 8928, Level 16, State 1, Line 4
Object ID 536441035, index ID 5: Page (1:2333322) could not be processed. See other errors for details.
Msg 8928, Level 16, State 1, Line 4
Object ID 536441035, index ID 5: Page (1:2333323) could not be processed. See other errors for details.
Msg 8928, Level 16, State 1, Line 4
Object ID 536441035, index ID 5: Page (1:2333324) could not be processed. See other errors for details.
There are 112592455 rows in 1218396 pages for object 'IssuesAndReceipts'.
CHECKTABLE found 0 allocation errors and 10 consistency errors in table 'IssuesAndReceipts' (object ID 536441035).
Msg 8944, Level 16, State 12, Line 4
Table error: Object ID 1628547397, index ID 5, page (1:2333320), row 0. Test (ColumnOffsets <= (nextRec - pRec)) failed. Values are 358 and 229.
Msg 8944, Level 16, State 12, Line 4
Table error: Object ID 1628547397, index ID 5, page (1:2333321), row 0. Test (ColumnOffsets <= (nextRec - pRec)) failed. Values are 358 and 19.
Msg 8939, Level 16, State 7, Line 4
Table error: Object ID 1628547397, index ID 5, page (1:2333322). Test (m_freeData >= PAGEHEADSIZE && m_freeData <= (UINT)PAGESIZE - m_slotCnt * sizeof (Slot)) failed. Values are 8178 and 7482.
Msg 8939, Level 16, State 7, Line 4
Table error: Object ID 1628547397, index ID 5, page (1:2333323). Test (m_freeData >= PAGEHEADSIZE && m_freeData <= (UINT)PAGESIZE - m_slotCnt * sizeof (Slot)) failed. Values are 7871 and 7482.
Msg 8944, Level 16, State 12, Line 4
Table error: Object ID 1628547397, index ID 5, page (1:2333324), row 0. Test (ColumnOffsets <= (nextRec - pRec)) failed. Values are 358 and 20.
CHECKTABLE found 0 allocation errors and 5 consistency errors in table '(Object ID 1628547397)' (object ID 1628547397).
repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKTABLE (Oracle.dbo.IssuesAndRecei
pts ).
Start Free Trial