Day 10: CheckDB error – Updateusage
One of our database was restored from earlier version 2000 to 2005. And when we run the maintenance plan of integrity check we got an error as follows:
Msg 2508, Level 16, State 3, Line 1
The In-row data XXXX page count for object “xxx”,
index ID 0, partition ID 000000, alloc unit ID 000000
(type In-row data) is incorrect. Run DBCC UPDATEUSAGE.
CHECKDB found 0 allocation errors and 1 consistency errors in table ‘xxx’ (object ID 000).
CHECKDB found 0 allocation errors and 1 consistency errors in database ‘xxx.
It shows there was some issue on consistence check for these objects(tables). This table has two indexes.
The issue here is there was some problem in earlier database(sql server 2000) , which has been restored on newer version (2005), which inherits the issue to new database. To resolve the issue
- We can correct the issue on old database and backup and restore the good backed up database.
- If the issue resolved after rebuild of indexes. Then drop an index and create and see if that resolves the issue
- Manually make some changes in maintenance plan(script) to include UPDATEUSAGE command for these objects.