none
DBCC CHECKDB on tempdb

    Question

  • When I run DBCC CHECKDB on tempdb I get the following message. Could someone explain what it means? 
    DBCC results for 'tempdb'.
    Wednesday, May 16, 2018 7:23 AM

Answers

  • Thanks for your response.Please see the error message below

    "DBCC CHECKDB will not check SQL Server catalog or Service Broker consistency because a database snapshot could not be created or because WITH TABLOCK was specified."

    Yes, that's by design. The part of error message complaining about the snapshot is because a "database snapshot" cannot be created for tempdb. The reason is, recovery is run to create a snapshot and since recovery cannot be run against tempdb, its snapshot cannot be created and hence, CHECKDB cannot be run against tempdb using snapshot.

    Also, as mentioned in the previous reply, CHECKDB against tempdb skips allocation and catalog checks and so what you are seeing is the normal behavior of SQL Server.

    Hope this helps.

     

    Please remember to click "Mark as Answer" if my response answered your question or click "Vote as helpful" if it helped you in any way.

    • Marked as answer by america21 Wednesday, May 16, 2018 2:57 PM
    Wednesday, May 16, 2018 2:15 PM

All replies

  • Hello,

    is that the complete Output or is there more?


    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Wednesday, May 16, 2018 7:49 AM
    Moderator
  • When I run DBCC CHECKDB on tempdb I get the following message. Could someone explain what it means? 
    DBCC results for 'tempdb'.

    Could you post the full output? are there any errors? Remember, CHECKDB against tempdb is not same as running it against any other user database. Some consistency checks are skipped for tempdb.


    Please remember to click "Mark as Answer" if my response answered your question or click "Vote as helpful" if it helped you in any way.

    Wednesday, May 16, 2018 9:58 AM
  • Thanks for your response.Please see the error message below

    "DBCC CHECKDB will not check SQL Server catalog or Service Broker consistency because a database snapshot could not be created or because WITH TABLOCK was specified."

    Wednesday, May 16, 2018 2:09 PM
  • Thanks for your response.Please see the error message below

    "DBCC CHECKDB will not check SQL Server catalog or Service Broker consistency because a database snapshot could not be created or because WITH TABLOCK was specified."

    Yes, that's by design. The part of error message complaining about the snapshot is because a "database snapshot" cannot be created for tempdb. The reason is, recovery is run to create a snapshot and since recovery cannot be run against tempdb, its snapshot cannot be created and hence, CHECKDB cannot be run against tempdb using snapshot.

    Also, as mentioned in the previous reply, CHECKDB against tempdb skips allocation and catalog checks and so what you are seeing is the normal behavior of SQL Server.

    Hope this helps.

     

    Please remember to click "Mark as Answer" if my response answered your question or click "Vote as helpful" if it helped you in any way.

    • Marked as answer by america21 Wednesday, May 16, 2018 2:57 PM
    Wednesday, May 16, 2018 2:15 PM
  • This is known problem. Check the following article.

    https://support.microsoft.com/en-us/help/928518/error-message-when-you-run-any-of-the-dbcc-check-commands-in-sql-serve

    To resolve this problem, follow these steps instead of running the DBCC CHECK command against the database: 
    1. Create a database snapshot of the database for which you want to perform the checks. For more information about how to create a database snapshot, see the "Create a Database Snapshot (Transact-SQL)" topic in SQL Server Books Online.
    2. Run the DBCC CHECK command against the database snapshot.
    3. Drop the database snapshot after the DBCC CHECK command is completed.



    Thanks, AT

    Wednesday, May 16, 2018 2:18 PM