DBCC CHECKDB failed with error “Check Catalog Msg 3851, State 1”

Hello Friends,

Today, I came to very interesting fact of SQL Server, i.e. If we restore master database with different name and try to check integrity using DBCC CHECKDB then it gets failed with error “Check Catalog Msg 3851, State 1: An invalid row (class=,depid=,depsubid=) was found in the system table sys.syssingleobjrefs (class=13).
Msg 8992, Level 16, State 1, Line 2” .

Database Integrity checks” is a common and routine task for every DBA, which checks integrity of all objects using DBCC CHECKDB command. Today, I came to one situation where one database were failing integrity checks with “Check Catalog Msg 3851, State 1: An invalid row (class=,depid=,depsubid=) was found in the system table sys.syssingleobjrefs (class=13).Msg 8992, Level 16, State 1, Line 2” Error and it was quit surprising because the erroneous database was having similar name like master database. So I was suspecting; how master database has been corrupted!?; that could be a tense situation. Because we know the importance of system databases.

While internet searching I came to a very nice blog post by Paul S. Randal and came to know that integrity check fails for database which has restored from master database backup file.

 

 

Advertisements