HiveBrain v1.2.0
Get Started
← Back to all entries
patternModerate

DBCC DBINFO showing wrong information

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
showingdbccwrongdbinfoinformation

Problem

Though DBCC DBINFO() is undocumented, but we all know that


dbi_crdate: Database creation datatime

dbi_dbccLastKnownGood: the
completion time of the last 'clean' run of DBCC CHECKDB

For one of my database its showing following output.

Why output of DBCC DBINFO() showing smaller value for dbi_dbccLastKnownGood as compare to dbi_crdate. How can someone execute DBCC CHECKDB before a database is created ?

Solution

If you restore a database as a new database, the dbi_crdate field is the restore date/time.

Here's how to reproduce it:

  • Create a new database.



  • Run DBCC CHECKDB() on it.



  • Look at DBCC DBINFO() for the creation date and DBCC dates.



  • Back up the database.



  • Delete the database.



  • Restore the database (if you want to get fancy, use a different database name.)



  • Look at DBCC DBINFO() for the creation date and DBCC dates. The creation date will be the restore time, and the DBCC date will be earlier.

Context

StackExchange Database Administrators Q#83547, answer score: 14

Revisions (0)

No revisions yet.