DBCC CHECKDB / CHECKCATALOG Error 3853

Copper Contributor

Version: SQL Server 2019 (RTM-CU25) (KB5033688) - 15.0.4355.3 (X64), Enterprise Edition, Windows

When running DBCC CHECKDB or CHECKCATALOG we recently started getting the following errors:

Attribute (object_id=1295096596) of row (object_id=1295096596,stats_id=896001) in sys.objects does not have a matching row (object_id=564755797) in sys.stats.
Attribute (referenced_object_id=1295096596,key_index_id=896001) of row (object_id=1295096596) in sys.foreign_keys does not have a matching row (object_id=1295096596,index_id=896001) in sys.incremental_stats.

 

Although the database is in working order (for now), this appears to be across 3 tables. No changes were made to any tables. Looking at an older copy of the database, these records do NOT exist either in sys.stats or sys.foreign_keys. We can't find the table sys.incremental_stats - not even scouring the internet. 

After a month of support calls, Microsoft support can only suggest restoring from the last good backup or scripting out the database and migrating the data (18TB) - which is now not feasible. Support can't suggest how this happened or raise a bug.

We have tried everything:

  • Restored a backup copy to a new server
  • Index maintenance (re-org and rebuild)
  • Full stats updates
  • Dropped/recreated all indexes (inc. clustered)
  • Created new tables and dropped the old ones
  • DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS. 

The error still persists. It appears as though some internal process that updates the internal tables isn't firing. Has anybody seen this before? Any suggestions to fix this?

1 Reply
It seems DBCC CHECKDB was not working as excepted the causes fundamental inconsistency occured, as we can see error the above some objects doesnot matching row (Primary key and foreign key)
and MS suggested work around was TAB LOCK Hint.
https://learn.microsoft.com/en-us/troubleshoot/sql/database-engine/database-file-operations/8967-892...