There’s Nothing Quite Like An Inconsistent Consistency Checker!

This is not an April Fool’s joke (although it is somewhat silly). What you are about to read is true. Try it yourself.

I’ve been going through the databases at my new employer and running some checks and generally making sure everything is in good shape. I’ve spent two days running DBCC CHECKDB, DBCC DBINFO, and DBCC UPDATEUSAGE on hundreds of databases. Then, this morning in the shower, I realized something…. To run DBCC DBINFO on the current database (which I was doing to see find the databases that had been upgraded from versions earlier than 2005 per this post) you do this:

TRACEON (3604)
DBCC DBINFO ()

But if you try this, it will fail:

TRACEON (3604)
DBCC DBINFO (0)

Now if you want to run DBCC UPDATEUSAGE on the current database, you do this:

DBCC UPDATEUSAGE (0)

But if you try this, it will fail:

DBCC UPDATEUSAGE ()

 

I think someone needed to run PRCC on the DBCC code! (That would be Paul Randal Consistency Check.)

Share

Leave a Reply

Your email address will not be published. Required fields are marked *

I am a real person and can prove it by doing this math problem: (required) Time limit is exhausted. Please reload CAPTCHA.