sp_blitz shows “Last good DBCC CHECKDB over 2 weeks old”
-
10-10-2020 - |
Question
When I run sp_blitz
, I see
-[ RECORD 5 ]-------------------------
Priority | 1
FindingsGroup | Reliability
Finding | Last good DBCC CHECKDB over 2 weeks old
DatabaseName | model
URL | https://BrentOzar.com/go/checkdb
Details | Last successful CHECKDB: never.
QueryPlan | NULL
QueryPlanFiltered | NULL
CheckID | 68
-[ RECORD 6 ]-------------------------
Priority | 1
FindingsGroup | Reliability
Finding | Last good DBCC CHECKDB over 2 weeks old
DatabaseName | msdb
URL | https://BrentOzar.com/go/checkdb
Details | Last successful CHECKDB: never.
QueryPlan | NULL
QueryPlanFiltered | NULL
CheckID | 68
However, I just ran DBCC CHECKDB
.
Solution
The DatabaseName
is different in the output there. You have to run DBCC CHECKDB
for each database.
DBCC CHECKDB (model);
DBCC CHECKDB (msdb);
DBCC CHECKDB (master);
By default, DBCC CHECKDB
runs on the current database. If you connected without specifying a database, you're likely connected to the default database for your user. You can see your current database with
SELECT DB_NAME();
You can see all of your users' default databases with,
SELECT name, default_database_name FROM sys.server_principals;
You don't have to explicitly run it against the Resource Database, from the docs
However, when
DBCC CHECKDB
is executed against themaster
database, a second CHECKDB is also run internally on the Resource database.
Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange