DBCC CHECKDB

  • SQLDCH

    SSChampion

    Points: 11474

    Comments posted to this topic are about the item DBCC CHECKDB

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.
  • Koen Verbeeck

    SSC Guru

    Points: 258924

    Nice question, thanks.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • This was removed by the editor as SPAM

  • Carlo Romagnano

    SSC-Insane

    Points: 21744

    Nice question!

    Thanks!

    😀

  • Michael_Garrison

    Hall of Fame

    Points: 3050

    Got my coffee and took my time reading the question and the documentation. Patience and learning paid off, learned somthing, great question.

  • Zagyg

    SSCommitted

    Points: 1949

    realised i made a mistake moments after touching submit.

    Me too - when I saw that message saying "sorry, you were wrong"! :hehe:

  • Ed Wagner

    SSC Guru

    Points: 286957

    I knew it looked too easy and there had to be trick in there. I forgot about the limit by using TABLOCK.

  • SqlMel

    SSCrazy

    Points: 2891

    In my case, I didn't know about the limit when using TABLOCK, so I learned something today.

    Well, I don't feel so bad since 83% so far have been incorrect also 🙂

    ---------------
    Mel. 😎

  • Raghavendra Mudugal

    SSChampion

    Points: 10658

    SqlMel (8/20/2014)


    In my case, I didn't know about the limit when using TABLOCK, so I learned something today.

    Well, I don't feel so bad since 83% so far have been incorrect also 🙂

    +1

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • ssimmons 2102

    SSCommitted

    Points: 1634

    hmmm - I'm looking at 2014 docs, looks like it does run DBCC CheckCatalog

  • SQLRNNR

    SSC Guru

    Points: 281210

    This question highlights another great example of bad (conflicting) documentation.

    Within the same documentation one will find both of the following statements.

    DBCC CHECKDB does not examine disabled indexes.

    And

    Unless NOINDEX is specified, DBCC CHECKDB performs both physical and logical consistency checks on a single table and on all its nonclustered indexes.

    That last one is stated twice for good measure.

    SQL 2012 Version

    http://msdn.microsoft.com/en-us/library/ms176064(v=sql.110).aspx

    For good measure, the document is nearly the same for SQL 2014 (other areas changed but those statements were not).

    http://msdn.microsoft.com/en-us/library/ms176064(v=sql.120).aspx

    Even better is that the 2014 document has information regarding compatibility 90 which is not supported in SQL 2014.

    You can read a bit about the compatibility levels here[/url].

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • paul.knibbs

    SSCoach

    Points: 15270

    Internal note: try reading the *whole* MSDN bit about TABLOCK before answering...missed that very important last line! 🙁

  • Marcia J

    SSCertifiable

    Points: 5628

    Good job of documenting the reasons for why each answer was right or wrong.

  • TomThomson

    SSC Guru

    Points: 104765

    Nice question. 😎

    But I have one niggle :hehe:: you can't run that command against tempdb, because it is specifically acting of the database 'myDatabase' :laugh::crazy:; but it was absolutely obvious what you meant to ask so it's hard to see why so many people got that wrong :-P:laugh:. Unless of course they believe in being secure so that they normally log in as a user who doesn't have the permissions needed to run dbcc checdb against tempdb and think that QotD should be aimed at people who behave securely.

    But anyway, any other choice for the second correct option was obviously wrong :w00t:, so even security lovers should have gotten it right.

    Tom

  • SQLDCH

    SSChampion

    Points: 11474

    ssimmons 2102 (8/20/2014)


    hmmm - I'm looking at 2014 docs, looks like it does run DBCC CheckCatalog

    Do you have a link? The link I sent is for 2014; under the TABLOCK directive explanation it says fairly clearly:

    "TABLOCK limits the checks that are performed; DBCC CHECKCATALOG is not run on the database, and Service Broker data is not validated."

    Granted I did not explore past this document.

    ----------------------------------------------------------------------------
    Sacramento SQL Server users group - http://sac.sqlpass.org
    Follow me on Twitter - @SQLDCH
    ----------------------------------------------------------------------------

    Yeah, well...The Dude abides.

Viewing 15 posts - 1 through 15 (of 22 total)

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