我们正在离线服务器上设置离线 DBCC checkdbs,这样我们仍然可以进行检查,但不会干扰生产。
当我们备份主数据库并恢复它(甚至直接在同一生产机器上的本地 SSD 上)时,当我们 DBCC CHECKDB 恢复的数据库(master_restore)时,我们会得到 36 个损坏错误。
但是当我 DBCC CHECKDB 原来的主数据库时,我没有得到任何错误。任何想法?
Check Catalog Msg 3851, State 1: An invalid row (class=12,depid=0,depsubid=0) was found in the system table sys.syssingleobjrefs (class=12).
Check Catalog Msg 3851, State 1: An invalid row (class=13,depid=1,depsubid=0) was found in the system table sys.syssingleobjrefs (class=13).
Check Catalog Msg 3851, State 1: An invalid row (class=60,depid=1,depsubid=0) was found in the system table sys.syssingleobjrefs (class=60).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=1,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=13,depid=2,depsubid=0) was found in the system table sys.syssingleobjrefs (class=13).
Check Catalog Msg 3851, State 1: An invalid row (class=60,depid=2,depsubid=0) was found in the system table sys.syssingleobjrefs (class=60).
Check Catalog Msg 3851, State 1: An invalid row (class=60,depid=3,depsubid=0) was found in the system table sys.syssingleobjrefs (class=60).
Check Catalog Msg 3851, State 1: An invalid row (class=60,depid=4,depsubid=0) was found in the system table sys.syssingleobjrefs (class=60).
Check Catalog Msg 3851, State 1: An invalid row (class=60,depid=5,depsubid=0) was found in the system table sys.syssingleobjrefs (class=60).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=261,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=262,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=263,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=264,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=266,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=268,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=269,depsubid=0,indepid=9,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=269,depsubid=0,indepid=10,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=273,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=274,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=277,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=278,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=279,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=280,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=26,depid=283,depsubid=0,indepid=3,indepsubid=0) was found in the system table sys.sysmultiobjrefs (class=26).
Check Catalog Msg 3851, State 1: An invalid row (class=76,depid=65536,depsubid=101) was found in the system table sys.syssingleobjrefs (class=76).
Check Catalog Msg 3851, State 1: An invalid row (class=76,depid=65536,depsubid=103) was found in the system table sys.syssingleobjrefs (class=76).
Check Catalog Msg 3851, State 1: An invalid row (class=76,depid=65536,depsubid=104) was found in the system table sys.syssingleobjrefs (class=76).
Check Catalog Msg 3851, State 1: An invalid row (class=76,depid=65536,depsubid=105) was found in the system table sys.syssingleobjrefs (class=76).
Check Catalog Msg 3851, State 1: An invalid row (class=76,depid=65536,depsubid=107) was found in the system table sys.syssingleobjrefs (class=76).
Check Catalog Msg 3851, State 1: An invalid row (class=76,depid=65537,depsubid=101) was found in the system table sys.syssingleobjrefs (class=76).
Check Catalog Msg 3851, State 1: An invalid row (class=76,depid=65537,depsubid=103) was found in the system table sys.syssingleobjrefs (class=76).
Check Catalog Msg 3851, State 1: An invalid row (class=76,depid=65537,depsubid=107) was found in the system table sys.syssingleobjrefs (class=76).
CHECKDB found 0 allocation errors and 32 consistency errors not associated with any single object.
Page (1:10) in database ID 13 is allocated in the SGAM (1:3) and PFS (1:1), but was not allocated in any IAM. PFS flags 'MIXED_EXT ALLOCATED 0_PCT_FULL'.
CHECKDB found 1 allocation errors and 0 consistency errors in table '(Object ID 99)' (object ID 99).
CHECKDB found 1 allocation errors and 32 consistency errors in database 'master_restore'
master 数据库是一个特例。您会注意到损坏位于第 10 页,即配置页。这显示为已损坏,因为它在恢复为用户数据库而不是实例的主数据库时丢失数据。
Paul Randal 写了一篇关于这个的帖子http://sqlmag.com/blog/my-master-database-really-corrupt