Hi Experts,
As we have the automatic backup from SQL server which is stopped on 11th August.
Then after we have run the DBCC CheckDB command in SQL, we have found the following Consistency errors.
Msg 8939, Level 16, State 98, Line 1
Table Error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -23086640398336 (type Unknown), page (17920:1258361601). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 133129 and -10.
Msg 8909, Level 16, State 1, Line 1
Table Error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 4828106190657355776 (type Unknown), page ID (1:11113694) contains an incorrect page ID in its page header. The PageId in the page header = (0:1124073472).
Msg 8909, Level 16, State 1, Line 1
Table Error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 19140343168761856 (type Unknown), page ID (1:11113695) contains an incorrect page ID in its page header. The PageId in the page header = (1739:13).
Msg 8909, Level 16, State 1, Line 1
Table Error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 562949953355776 (type Unknown), page ID (1:11113696) contains an incorrect page ID in its page header. The PageId in the page header = (16639:-1).
Msg 8939, Level 16, State 98, Line 1
Table Error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 2305899085682442240 (type Unknown), page (29184:1627408128). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 133129 and -14.
Msg 8909, Level 16, State 1, Line 1
Table Error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -6231574509397213184 (type Unknown), page ID (1:11113698) contains an incorrect page ID in its page header. The PageId in the page header = (256:0).
Msg 8939, Level 16, State 98, Line 1
Table Error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -199554976645120 (type Unknown), page (1449:7). Test (IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 133129 and -10.
Msg 8909, Level 16, State 1, Line 1
Table Error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 30962741366030336 (type Unknown), page ID (1:11113700) contains an incorrect page ID in its page header. The PageId in the page header = (48:5505107).
Msg 8909, Level 16, State 1, Line 1
Table Error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 30962741366030336 (type Unknown), page ID (1:11113701) contains an incorrect page ID in its page header. The PageId in the page header = (48:5505107).
CHECKDB found 0 allocation errors and 32429 consistency errors in database 'XYZ'
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
We have restored the recent(10/08/2019) backup database and Executed the DBCC command in SQL, But there are no consistency errors.
There are issues from 11/08/19. Because we didn’t find any errors in 10/08/19.
Note: we have not made any changes.
Today we are trying to repair one of the test databases, But we found consistency errors.
Command:
ALTER DATABASE Test_KP_19082019 SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
BEGIN TRANSACTION;
DBCC CHECKDB ('Test_KP_19082019', REPAIR_ALLOW_DATA_LOSS);
ALTER DATABASE Test_KP_19082019 SET MULTI_USER;
Errors:
Nonqualified transactions are being rolled back. Estimated rollback completion: 0%.
Nonqualified transactions are being rolled back. Estimated rollback completion: 100%.
DBCC results for 'Test_KP_19082019'.
Service Broker Msg 9675, State 1: Message Types analyzed: 14.
Service Broker Msg 9676, State 1: Service Contracts analyzed: 6.
Service Broker Msg 9667, State 1: Services analyzed: 3.
Service Broker Msg 9668, State 1: Service Queues analyzed: 3.
Service Broker Msg 9669, State 1: Conversation Endpoints analyzed: 0.
Service Broker Msg 9674, State 1: Conversation Groups analyzed: 0.
Service Broker Msg 9670, State 1: Remote Service Bindings analyzed: 0.
Service Broker Msg 9605, State 1: Conversation Priorities analyzed: 0.
Msg 8909, Level 16, State 1, Line 3
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -9223372036854710272 (type Unknown), page ID (1:11116079) contains an incorrect page ID in its page header. The PageId in the page header = (64:43412).
Repairing this error requires other errors to be corrected first.
Msg 8909, Level 16, State 1, Line 3
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -9223372036854710272 (type Unknown), page ID (1:11116353) contains an incorrect page ID in its page header. The PageId in the page header = (64:43415).
Repairing this error requires other errors to be corrected first.
Msg 8909, Level 16, State 1, Line 3
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -9223372036854710272 (type Unknown), page ID (1:11120722) contains an incorrect page ID in its page header. The PageId in the page header = (64:43312).
Repairing this error requires other errors to be corrected first.
Msg 8939, Level 16, State 5, Line 3
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -9223372036854644736 (type Unknown), page (1:11117928). Test (m_headerVersion == HEADER_7_0) failed. Values are 91 and 1.
Repairing this error requires other errors to be corrected first.
Msg 8939, Level 16, State 6, Line 3
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -9223372036854644736 (type Unknown), page (1:11117928). Test ((m_type >= DATA_PAGE && m_type <= UNDOFILE_HEADER_PAGE) || (m_type == UNKNOWN_PAGE && level == BASIC_HEADER)) failed. Values are 0 and 0.
Repairing this error requires other errors to be corrected first.
Msg 8939, Level 16, State 7, Line 3
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -9223372036854644736 (type Unknown), page (1:11117928). Test (m_freeData >= PageHeaderOverhead () && m_freeData <= (UINT)PAGESIZE - m_slotCnt * sizeof (Slot)) failed. Values are 0 and 8192.
Repairing this error requires other errors to be corrected first.
Msg 8939, Level 16, State 11, Line 3
Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID -9223372036854644736 (type Unknown), page (1:11117928). Test (m_ghostRecCnt <= m_slotCnt) failed. Values are 65535 and 0.
Repairing this error requires other errors to be corrected first.
CHECKDB found 0 allocation errors and 33381 consistency errors in database 'Test_KP_19082019'. DBCC execution completed.
If DBCC printed error messages, contact your system administrator.
Msg 226, Level 16, State 6, Line 4 ALTER DATABASE statement not allowed within a multi-statement transaction.
Can anyone help me to fix this issue?
Any help would be greatly appreciated.
Thanks
Ramya.