I was greeted at work this morning with a wonderful SQL job failed email. The job in question failed with the below details:

“Executed as user: sqluser. The In-row data USED page count for object “sqltable“, index ID 8, partition ID 2387525817270272, alloc unit ID 2387525817270272 (type In-row data) is incorrect. Run DBCC UPDATEUSAGE. [SQLSTATE 42000] (Error 2508) The In-row data RSVD page count for object “sqltable“, index ID 8, partition ID 2387525817270272, alloc unit ID 2387525817270272 (type In-row data) is incorrect. Run DBCC UPDATEUSAGE. [SQLSTATE 42000] (Error 2508) CHECKDB found 0 allocation errors and 2 consistency errors in table ‘sqltable2‘ (object ID 2071014459). [SQLSTATE 01000] (Error 8990) CHECKDB found 0 allocation errors and 2 consistency errors in database ‘databasename‘. [SQLSTATE 01000] (Error 8989). The step failed.”

For the above issue I have a very concise answer found by way of msdn Books Online. 🙂

Reports and corrects pages and row count inaccuracies in the catalog views. These inaccuracies may cause incorrect space usage reports returned by the sp_spaceused system stored procedure.

For further detail follow the below link to the msdn library for a full description and usage of the management command, DBCC UPDATEUSAGE.

MSDN – DBCC UPDATEUSAGE