Home > SQL Server 2005 Practical Troubleshooting
Book Excerpt:
EMAIL THIS LICENSING & REPRINTS

SQL Server 2005 Practical Troubleshooting

14 Mar 2007 | Addison-Wesley

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

Database consistency errors

At this point, we have covered three major areas of data recovery: issues with accessing system databases, problems accessing user databases, and backup/restore failures. Now let's talk about detecting database consistency problems during the normal database operation. I classify database consistency detection (errors) into two types:

  • Runtime error, errors detected by the engine during standard usage of the database (SELECT, UPDATE, background thread such as lazywrite, and so on)
  • Errors detected by DBCC CHECKDB

Handling Database Consistency Runtime Errors

The SQL Server engine contains code to perform some validation of the data (and transaction) log as you execute commands such as SELECT, INSERT, and so on against a database. The following is not a complete list of these errors, but these are the ones I anticipate you may encounter the most.

Msg 823 and 824

The SQL Server engine has two methods to report problems reading database pages (and transaction log blocks):

  • If the Windows API calls return an error when reading the page, Msg 823 is raised.
  • If the Windows API call is successful, the engine performs a series of logical checks on the page (based on database options configured). If any of these checks fails, an Msg 824 is raised.

The following is an example of a Msg 823 error:

2005-09-07 10:51:05.16 spid18s Error: 823, Severity: 24, State: 6. 2005-09-07 10:51:05.16 spid18s The operating system returned error 1117(The request could not be performed because of an I/O device error.) to SQL Server during a read at offset 0000000000000000 in file 'E:EdgeTachyonDatabaseFilesEdgePerfTachyonDB.mdf'.

Additional messages in the SQL Server error log and system event log may provide more detail. This is a severe system-level error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

As you can see from the message, the SQL Server development team included the Windows error returned from the Windows API call to read the page from disk. Almost every 823 error is caused by a system problem. In this case, SQL Server reports only the error the operating system reported when reading from the file. Look at preceding the example. The text of the message even indicates there is a problem with a disk storage device. The one exception to this guideline that I've seen is error 6, "Invalid handle." In this situation, it is possible SQL Server passed an invalid file handle to the Windows API call, so this should be investigated with technical support.

If the Windows API call to read the page is successful, the following logical checks are applied in this order:

  1. Is the page torn (torn page detection)?
  2. Did a checksum fail when reading the page (checksum error)?
  3. Is the pageid on the page different from the page we expected to read from disk (bad pageid)?

The following is an example of a Msg 824 due to a database checksum validation check failure:

2006-08-25 14:38:39.34 spid53 Error: 824, Severity: 24, State: 2. 2006-08-25 14:38:39.34 spid53 SQL Server detected a logical consistency-based I/O error: incorrect checksum (expected: 0x6cbf615; actual: 0x6dacdc1). It occurred during a read of page (1:177) in database ID 13 at offset 0x00000000162000 in file 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDATAtest_checksum.mdf'. Additional messages in the SQL Server error log or system event log may provide more detail. This is a severe error condition that threatens database integrity and must be corrected immediately. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

Should you see an 824 error in the ERRORLOG, take immediate action, because this means the engine has detected a consistency problem in the database. The damage may be isolated to the page reported in the log, but it could go beyond that. Therefore, I recommend you run DBCC CHECKDB on the database as soon as possible. But which database? The server cannot provide you database context for this error, but it does provide you the filename associated with the physical filename it was reading for this page. If you can't recognize the database associated with the filename in the error, take the filename from the message and use it in the catalog view query:

select * from master.sys.master_files where physical_name = ''

At minimum, I expect DBCC CHECKDB to report an error for the page associated with Msg 824. At this point, if only a single page is damaged, you could restore from a backup (remember page-level restore here), or you can repair the database WITH REPAIR_ALLOW_DATA_LOSS. If more errors exist, your options may be more limited, or your data loss may be more severe. The point is, don't ignore 824 errors. It could be the tip of the iceberg of larger damage to your database.

Msg 825 (Read Retry)

While investigating a series of Exchange storage consistency problems, the Exchange development team discovered that if they were to retry failed read operations from disk, in some cases the second, third, or even fourth read attempt would succeed. So, instead of taking a beating from their customers for Exchange store corruption, they decided to add in logic to retry database read failures.

The SQL Server development team decided to adopt this same strategy for SQL Server 2005. Any read failure (823 or 824) will first be retried up to four times by the SQL Engine, before reporting the failure. If at any point the read succeeds, the following message is written to the ERRORLOG:

2005-04-27 16:06:35.98 spid346 A read of the file 'f:mssqlmssql.1mssqldatastressdb2.ndf' at offset 0x00000000302000 succeeded after failing 1 time(s) with error: incorrect pageid (expected 4:385; actual 0:0). Additional messages in the SQL Server error log and system event log may provide more detail. This error condition threatens database integrity and must be corrected. Complete a full database consistency check (DBCC CHECKDB). This error can be caused by many factors; for more information, see SQL Server Books Online.

Remember that because the retry succeeded, the user will not see any error. The only difference will be a slight delay in performance (which may or may not truly be seen by the application user). But this does not mean you do not need to address this problem. Think of this message the same as you would an 823 or 824 error, but perhaps at a slightly less-urgent pace. The engine avoided a failure, but this doesn't mean this retry will work all the time. Some disk system issue caused at least one read to fail and therefore should be investigated.

Msg 5242 and 5243 (RecBase Error)

The SQL Server engine also has logical checks to detect consistency problems for a row within a database page. In previous versions of SQL Server, this check would result in an assertion (a fatal error that results in a stack dump) with the expression containing the word RecBase. RecBase is the name of a class used to logically read the elements of a row on a page. See Microsoft Knowledge Base article 828337 for more information.

In SQL Server 2005, two errors were introduced to report all row consistency errors detected while reading a row as part of a standard SELECT, UPDATE, and so on, Msg 5242 and 5243. The following is an example of an ERRORLOG containing a Msg 5242 error (with some sections omitted for brevity):

2006-02-18 19:33:09.40 spid51 ex_raise2: Exception raised, major=52, minor=42, state=1, severity=22, attempting to create symptom dump 2006-02-18 19:33:09.58 spid51 Using 'dbghelp.dll' version '4.0.5' 2006-02-18 19:33:09.59 spid51 **Dump thread - spid = 51, PSS = 0x048B9278, EC = 0x048B9280 2006-02-18 19:33:09.59 spid51 * 2006-02-18 19:33:09.59 spid51 * User initiated stack dump. This is not a server exception dump. 2006-02-18 19:33:09.59 spid51 * 2006-02-18 19:33:09.61 spid51 ***Stack Dump being sent to C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLLOGSQLDump0001.txt 2006-02-18 19:33:09.61 spid51 * ******************************************************************************* 2006-02-18 19:33:09.61 spid51 * 2006-02-18 19:33:09.61 spid51 * BEGIN STACK DUMP: 2006-02-18 19:33:09.61 spid51 * 02/18/06 19:33:09 spid 51 2006-02-18 19:33:09.61 spid51 * 2006-02-18 19:33:09.61 spid51 * ex_raise2: Exception raised, major=52, minor=42, state=1, severity=22 2006-02-18 19:33:09.61 spid51 * ***************************************************************************** 2006-02-18 19:33:09.61 spid51 * ------------------------------------------------------------------------------- 2006-02-18 19:33:09.61 spid51 * Short Stack Dump 2006-02-18 19:33:09.62 spid51 77E55DEA Module(kernel32+00015DEA) 2006-02-18 19:33:09.62 spid51 02172CE4 Module(sqlservr+01172CE4) 2006-02-18 19:33:09.62 spid51 02176BA0 Module(sqlservr+01176BA0) 2006-02-18 19:33:09.62 spid51 0217674D Module(sqlservr+0117674D) 2006-02-18 19:33:09.62 spid51 01597EA2 Module(sqlservr+00597EA2) 2006-02-18 19:33:09.62 spid51 01095FFE Module(sqlservr+00095FFE) 2006-02-18 19:33:09.62 spid51 02389FB0 Module(sqlservr+01389FB0) 2006-02-18 19:33:09.62 spid51 0158E526 Module(sqlservr+0058E526) 2006-02-18 19:33:09.62 spid51 0100C833 Module(sqlservr+0000C833) 2006-02-18 19:33:09.62 spid51 0100BF0F Module(sqlservr+0000BF0F) 2006-02-18 19:33:09.62 spid51 010106EB Module(sqlservr+000106EB) 2006-02-18 19:33:09.62 spid51 01010B3A Module(sqlservr+00010B3A) 2006-02-18 19:33:09.62 spid51 01010932 Module(sqlservr+00010932) 2006-02-18 19:33:09.62 spid51 010C0E2B Module(sqlservr+000C0E2B) 2006-02-18 19:33:09.62 spid51 01210454 Module(sqlservr+00210454) 2006-02-18 19:33:09.62 spid51 013F65A8 Module(sqlservr+003F65A8) 2006-02-18 19:33:09.62 spid51 013B3E42 Module(sqlservr+003B3E42) 2006-02-18 19:33:09.62 spid51 013B35EC Module(sqlservr+003B35EC) 2006-02-18 19:33:09.62 spid51 012101C2 Module(sqlservr+002101C2) 2006-02-18 19:33:09.62 spid51 01188FC9 Module(sqlservr+00188FC9) 2006-02-18 19:33:09.62 spid51 01189021 Module(sqlservr+00189021) 2006-02-18 19:33:09.62 spid51 01330A25 Module(sqlservr+00330A25) 2006-02-18 19:33:09.62 spid51 01330421 Module(sqlservr+00330421) 2006-02-18 19:33:09.62 spid51 01332C55 Module(sqlservr+00332C55) 2006-02-18 19:33:09.62 spid51 0100889F Module(sqlservr+0000889F) 2006-02-18 19:33:09.62 spid51 010089C5 Module(sqlservr+000089C5) 2006-02-18 19:33:09.62 spid51 010086E7 Module(sqlservr+000086E7) 2006-02-18 19:33:09.62 spid51 010D764A Module(sqlservr+000D764A) 2006-02-18 19:33:09.62 spid51 010D7B71 Module(sqlservr+000D7B71) 2006-02-18 19:33:09.62 spid51 010D746E Module(sqlservr+000D746E) 2006-02-18 19:33:09.62 spid51 010D83F0 Module(sqlservr+000D83F0) 2006-02-18 19:33:09.62 spid51 781329AA Module(MSVCR80+000029AA) 2006-02-18 19:33:09.64 spid51 78132A36 Module(MSVCR80+00002A36) 2006-02-18 19:33:09.65 spid51 * ------------------------------------------------------------------------------- 2006-02-18 19:33:09.65 spid51 Stack Signature for the dump is 0xE09D5555 2006-02-18 19:33:10.48 spid51 External dump process return code 0x20000001. External dump process returned no errors. 2006-02-18 19:33:10.58 spid51 Error: 5242, Severity: 22, State: 1. 2006-02-18 19:33:10.58 spid51 An inconsistency was detected during an internal operation in database 'master'(ID:1) on page (1:306). Please contact technical support. Reference number 3.

The error message says to contact technical support (I sure hate when our errors say that), but in reality you need to first run a DBCC CHECKDB in the database listed in the message. If it returns errors indicating row damage, you need to address those problems as a true database corruption problem. If CHECKDB does not report errors, it may be a good idea to contact technical support. Have the stack dump and ERRORLOG available for them to review.

Msg 605

Msg 605 is a legacy carryover from the original SYBASE code for SQL Server. In fact, it was pretty much the only way to know about a database consistency problem aside from DBCC CHECKDB. This error check still remains in the SQL Server 2005 code. You should treat this error much like the row-level consistency errors 5242 and 5243. If CHECKDB reports errors, treat the problem as database corruption. If not, consider contacting technical support if the errors occur frequently. It could indicate some problem in the SQL Server code that should be addressed.

Access Violations

For performance reasons, the SQL Server development team cannot put in validation checks for every bit on the database page at every place in the engine code. Therefore, it is possible the engine will run into an access violation because of database corruption. How can you recognize this case? Well, because an access violation could occur at so many different places due to corruption, there is one stack dump signature I could show you to say the problem is corruption. My advice is that if you are getting access violations frequently, you should always ensure DBCC CHECKDB is run for all databases before pursuing the cause of the access violation as a SQL Server bug.

Failed Rollback

Another example is online rollback recovery. If the rollback of a user transaction fails, this is a critical problem. So, the engine reacts by taking the user database offline and restarting it. This allows recovery to run on the database with the hopeful effect of rolling back the transaction that couldn't roll back online. This technique actually is quite successful, because in some cases the online rollback failure is an interim problem that won't reoccur when the transactions are rolled back from the log on disk. Again, in this situation, SQL Server attempts to isolate the failure. Only the database associated with the failed rollback is affected. The rest of the engine remains intact, and other databases are not affected. As with any reliability feature, there are always exceptions. Any failure to roll back a transaction in tempdb results in a server shutdown because there is no method to run recovery on tempdb, and it is a critical shared resource for all users.

Handling DBCC CHECKDB Errors

I've recommended that you run DBCC CHECKDB if you encounter some of the errors described here. You may also decide to run DBCC CHECKDB at any point in time to check the consistency of your database. I presented earlier in the chapter some nice enhancements to CHECKDB to help provide more consistency checks (for example, DATA_PURITY and CHECKCATALOG). Let's talk about a strategy to address errors that you can encounter with DBCC CHECKDB. In this section, I do not go over every error that CHECKDB can report. I talk later about how you can look for information on the web about each of the errors (documented by the authors of DBCC CHECKDB, Ryan Stonecipher and Paul Randal).

Look at Summaries and Recommendation Firs

When you run DBCC CHECKDB and it reports errors, I recommend you do two things first:

  • Look at what I call the summary messages.
  • Look at the recommendation messages.

Let's look at some example output that contains errors so that I can show you what I mean:

DBCC results for 'checkdb_test'. 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. Msg 8909, Level 16, State 1, Line 1 Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:153) contains an incorrect page ID in its page header. The PageId in the page header = (0:0). Msg 8909, Level 16, State 1, Line 1 Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:154) contains an incorrect page ID in its page header. The PageId in the page header = (0:0). Msg 8909, Level 16, State 1, Line 1 Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:155) contains an incorrect page ID in its page header. The PageId in the page header = (0:0). Msg 8909, Level 16, State 1, Line 1 Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:156) contains an incorrect page ID in its page header. The PageId in the page header = (0:0). Msg 8909, Level 16, State 1, Line 1 Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:157) contains an incorrect page ID in its page header. The PageId in the page header = (0:0). Msg 8909, Level 16, State 1, Line 1 Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:158) contains an incorrect page ID in its page header. The PageId in the page header = (0:0). CHECKDB found 0 allocation errors and 6 consistency errors not associated with any single object. DBCC results for 'sys.sysrowsetcolumns'. There are 544 rows in 5 pages for object "sys.sysrowsetcolumns". DBCC results for 'sys.sysrowsets'. There are 81 rows in 1 pages for object "sys.sysrowsets". DBCC results for 'sysallocunits'. There are 92 rows in 1 pages for object "sysallocunits". DBCC results for 'sys.sysfiles1'. There are 2 rows in 1 pages for object "sys.sysfiles1". DBCC results for 'sys.syshobtcolumns'. There are 544 rows in 5 pages for object "sys.syshobtcolumns". DBCC results for 'sys.syshobts'. There are 81 rows in 1 pages for object "sys.syshobts". DBCC results for 'sys.sysftinds'. There are 0 rows in 0 pages for object "sys.sysftinds". DBCC results for 'sys.sysserefs'. There are 92 rows in 1 pages for object "sys.sysserefs". DBCC results for 'sys.sysowners'. There are 14 rows in 1 pages for object "sys.sysowners". DBCC results for 'sys.sysprivs'. There are 120 rows in 1 pages for object "sys.sysprivs". DBCC results for 'sys.sysschobjs'. There are 50 rows in 1 pages for object "sys.sysschobjs". DBCC results for 'sys.syscolpars'. There are 423 rows in 7 pages for object "sys.syscolpars". DBCC results for 'sys.sysnsobjs'. There are 1 rows in 1 pages for object "sys.sysnsobjs". DBCC results for 'sys.syscerts'. There are 0 rows in 0 pages for object "sys.syscerts". DBCC results for 'sys.sysxprops'. There are 0 rows in 0 pages for object "sys.sysxprops". DBCC results for 'sys.sysscalartypes'. There are 27 rows in 1 pages for object "sys.sysscalartypes". DBCC results for 'sys.systypedsubobjs'. There are 0 rows in 0 pages for object "sys.systypedsubobjs". DBCC results for 'sys.sysidxstats'. There are 106 rows in 1 pages for object "sys.sysidxstats". DBCC results for 'sys.sysiscols'. There are 218 rows in 1 pages for object "sys.sysiscols". DBCC results for 'sys.sysbinobjs'. There are 23 rows in 1 pages for object "sys.sysbinobjs". DBCC results for 'sys.sysobjvalues'. There are 104 rows in 16 pages for object "sys.sysobjvalues". DBCC results for 'sys.sysclsobjs'. There are 14 rows in 1 pages for object "sys.sysclsobjs". DBCC results for 'sys.sysrowsetrefs'. There are 0 rows in 0 pages for object "sys.sysrowsetrefs". DBCC results for 'sys.sysremsvcbinds'. There are 0 rows in 0 pages for object "sys.sysremsvcbinds". DBCC results for 'sys.sysxmitqueue'. There are 0 rows in 0 pages for object "sys.sysxmitqueue". DBCC results for 'sys.sysrts'. There are 1 rows in 1 pages for object "sys.sysrts". DBCC results for 'sys.sysconvgroup'. There are 0 rows in 0 pages for object "sys.sysconvgroup". DBCC results for 'sys.sysdesend'. There are 0 rows in 0 pages for object "sys.sysdesend". DBCC results for 'sys.sysdercv'. There are 0 rows in 0 pages for object "sys.sysdercv". DBCC results for 'sys.syssingleobjrefs'. There are 133 rows in 1 pages for object "sys.syssingleobjrefs". DBCC results for 'sys.sysmultiobjrefs'. There are 102 rows in 1 pages for object "sys.sysmultiobjrefs". DBCC results for 'sys.sysdbfiles'. There are 2 rows in 1 pages for object "sys.sysdbfiles". DBCC results for 'sys.sysguidrefs'. There are 0 rows in 0 pages for object "sys.sysguidrefs". DBCC results for 'sys.sysqnames'. There are 91 rows in 1 pages for object "sys.sysqnames". DBCC results for 'sys.sysxmlcomponent'. There are 93 rows in 1 pages for object "sys.sysxmlcomponent". DBCC results for 'sys.sysxmlfacet'. There are 97 rows in 1 pages for object "sys.sysxmlfacet". DBCC results for 'sys.sysxmlplacement'. There are 17 rows in 1 pages for object "sys.sysxmlplacement". DBCC results for 'sys.sysobjkeycrypts'. There are 0 rows in 0 pages for object "sys.sysobjkeycrypts". DBCC results for 'sys.sysasymkeys'. There are 0 rows in 0 pages for object "sys.sysasymkeys". DBCC results for 'sys.syssqlguides'. There are 0 rows in 0 pages for object "sys.syssqlguides". DBCC results for 'sys.sysbinsubobjs'. There are 0 rows in 0 pages for object "sys.sysbinsubobjs". DBCC results for 'sys.queue_messages_1977058079'. There are 0 rows in 0 pages for object "sys.queue_messages_1977058079". DBCC results for 'sys.queue_messages_2009058193'. There are 0 rows in 0 pages for object "sys.queue_messages_2009058193". DBCC results for 'sys.queue_messages_2041058307'. There are 0 rows in 0 pages for object "sys.queue_messages_2041058307". DBCC results for 'table1'. Msg 8928, Level 16, State 1, Line 1 Object ID 2073058421, index ID 0, partition ID 72057594038321152, alloc unit ID 72057594042318848 (type In-row data): Page (1:153) could not be processed. See other errors for details. Msg 8928, Level 16, State 1, Line 1 Object ID 2073058421, index ID 0, partition ID 72057594038321152, alloc unit ID 72057594042318848 (type In-row data): Page (1:154) could not be processed. See other errors for details. Msg 8928, Level 16, State 1, Line 1 Object ID 2073058421, index ID 0, partition ID 72057594038321152, alloc unit ID 72057594042318848 (type In-row data): Page (1:155) could not be processed. See other errors for details. Msg 8928, Level 16, State 1, Line 1 Object ID 2073058421, index ID 0, partition ID 72057594038321152, alloc unit ID 72057594042318848 (type In-row data): Page (1:156) could not be processed. See other errors for details. Msg 8928, Level 16, State 1, Line 1 Object ID 2073058421, index ID 0, partition ID 72057594038321152, alloc unit ID 72057594042318848 (type In-row data): Page (1:157) could not be processed. See other errors for details. Msg 8928, Level 16, State 1, Line 1 Object ID 2073058421, index ID 0, partition ID 72057594038321152, alloc unit ID 72057594042318848 (type In-row data): Page (1:158) could not be processed. See other errors for details. There are 88 rows in 44 pages for object "table1". CHECKDB found 0 allocation errors and 6 consistency errors in table 'table1' (object ID 2073058421). DBCC results for 'table2'. Msg 2511, Level 16, State 1, Line 1 Table error: Object ID 2089058478, index ID 2, partition ID 72057594038452224, alloc unit ID 72057594042449920 (type In-row data). Keys out of order on page (1:210), slots 157 and 158. There are 1000 rows in 3 pages for object "table2". CHECKDB found 0 allocation errors and 1 consistency errors in table 'table2' (object ID 2089058478). CHECKDB found 0 allocation errors and 13 consistency errors in database 'checkdb_test'. repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (checkdb_test). DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Go to the bottom of the output and look at the summary and recommendation messages for the database:

CHECKDB found 0 allocation errors and 13 consistency errors in database 'checkdb_test'. repair_allow_data_loss is the minimum repair level for the errors found by DBCC CHECKDB (checkdb_test).

You know from this message that 13 errors related to the consistency of pages or indexes have been detected (as opposed to allocation errors that are specific to problems with allocation structures found by the CHECKALLOC phase). You also know that in order to repair all 13 errors, you must use the REPAIR_ALLOW_DATA_LOSS repair option. You could just move forward with this recommendation and check the results. However, if you want to know what the repair recommendation is for each table found to have problems, you could check each one. Which tables do I check? Look at the summary messages for each table:

CHECKDB found 0 allocation errors and 6 consistency errors not associated with any single object. CHECKDB found 0 allocation errors and 6 consistency errors in table 'table1' (object ID 2073058421). CHECKDB found 0 allocation errors and 1 consistency errors in table 'table2' (object ID 2089058478).

First, you should know that CHECKDB won't produce this summary message for a table unless it detects problems with that table. Second, notice the first summary message says "not associated with any single object." This message indicates that CHECKDB found errors associated with pages that don't appear to belong to a known table.

In this situation, what is happening is that CHECKDB is in a way "double-reporting" errors, but that is to your advantage in this situation. Let's look at the errors "not associated with any single object."

Msg 8909, Level 16, State 1, Line 1 Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 0 (type Unknown), page ID (1:153) contains an incorrect page ID in its page header. The PageId in the page header = (0:0).

This message indicates a problem with the page ID as found on the page header. The page ID was expected to be 153, but on the page it was found to be 0:0. The routine that detects this problem is used throughout the CHECKDB code to read a page. In this routine, the table associated with the page is found by looking up the allocation unit ID on the page header. As you can see from the error message, that value is 0, and therefore CHECKDB doesn't know what table this page belongs to.

Now look at the errors associated with table1:

Msg 8928, Level 16, State 1, Line 1 Object ID 2073058421, index ID 0, partition ID 72057594038321152, alloc unit ID 72057594042318848 (type In-row data): Page (1:153) could not be processed. See other errors for details.

If you look closely, you will notice this error is for the same page as the one I just talked about for 8909. In fact, all the pages in errors 8909 and 8928 are the same. Why does the se