SQL Hash and dbcc checkDB

  • Hello all!

    I'm using Ola Hallengren's database integrity check (which is amazing) and have a question.

    I have a monitoring tool which is showing me three different SQL hashes during a 10 minute time slice and each hash is for a DBCC CheckDB against a different database.

    Am I correct in assuming that each database created it's own hash identifier since each database is a unique statement,

    dbcc checkdb [Awesome] would be different than dbcc checkdb [lessAwsome] but I just wanted a sanity check to make sure I'm assuming right.

    Thanks!

    Brendan

  • Yes. A query hash is based on the query itself. So:

    DBCC CHECKDB('Myfirstdatabase')

    Is going to have a different hash value than:

    DBCC CHECKDB('ADifferentDatabaseEntirely')

    No shocks there at all.

    ----------------------------------------------------The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood... Theodore RooseveltThe Scary DBAAuthor of: SQL Server 2017 Query Performance Tuning, 5th Edition and SQL Server Execution Plans, 3rd EditionProduct Evangelist for Red Gate Software

  • Thank you!

    I just wanted to double check since you know what they say about assuming.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply