I have a VLDB and I offload the DBCC CHECKDB to another server. Is it possible to update the dbi_dbccLastKnownGood on the VLDB server so it passes any scripts that check that date like sp_Blitz?
2 Answers
No, this feature was put in to record the last time that DBCC CHECKDB ran successfully. It would be extremely unlikely that a feature would be added that allows this value to be edited at will and effectively lie about the history.
The only way to update this that does not actually involve hacking the database boot page is to execute DBCC CHECKDB.
So you should customise these scripts to not report that issue or ignore this result if it is entirely expected that this database isn't being checked due to alternate arrangements.
- 87,941
- 15
- 255
- 354
I agree with Martin on running CHECKDB to make sure that you do not have corruption.
Relying on dbi_dbccLastKnownGood does not tell you the full truth if DBCC CHECKDB was ran clean on the database.
For VLDB, people just run DBCC CHECKDB ('your_db_name') WITH PHYSICAL_ONLY;. This will update the dbi_dbccLastKnownGood along with DBCC CHECKFILEGROUP.
From SQLSkill's blog - Note that CHECKDB .. WITH PHYSICAL_ONLY will :
- Run the equivalent of DBCC CHECKALLOC
- Read and audit every allocated page in the database
- It skips all the logical checks, inter-page checks, and things like DBCC CHECKCATALOG.
So there’s a trade-off of consistency checking depth against run-time and resource usage – but this option will pick up problems caused by the IO subsystem as long as page checksums are enabled and present.