SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


DBCC CHECKDB


DBCC CHECKDB

Author
Message
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)SSC Guru (65K reputation)

Group: General Forum Members
Points: 65026 Visits: 13298
Back to basics. Thanks for the question Steve.


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Dave62
Dave62
Hall of Fame
Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)Hall of Fame (3.6K reputation)

Group: General Forum Members
Points: 3585 Visits: 2836
Nice question Steve!

So far, the most chosen wrong answer is: CHECKINTEGRITY. Hehe

Which, of course is not a valid DBCC check. w00t
OCTom
OCTom
SSCarpal Tunnel
SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)SSCarpal Tunnel (4.2K reputation)

Group: General Forum Members
Points: 4175 Visits: 4152
Dave62 (7/31/2013)
Nice question Steve!

So far, the most chosen wrong answer is: CHECKINTEGRITY. Hehe

Which, of course is not a valid DBCC check. w00t


No it's not, but, it sounds really good for one. A nice red herring thrown in there by Steve. :-)

However, there is an SSIS task named Check Database Integrity. ;-)
Tom Thomson
Tom Thomson
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26529 Visits: 12506
It's a good question.

It's a bit shocking to see that so far out of just over 600 people about 55 people picked the non-existent and utterly implausible DBCC CHECKCACHE, and about 175 picked the equally non-existent although less implausible sounding DBCC CHECKFILEGROUP; and it seems amazing that about 120 people thought that DBCC CHECKIDENT was something that DBCC CHECKDB would do. So I hope that people will learn from this question.

Tom

Miles Neale
Miles Neale
SSCarpal Tunnel
SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)SSCarpal Tunnel (4.3K reputation)

Group: General Forum Members
Points: 4300 Visits: 1695
L' Eomot Inversé (7/31/2013)
It's a good question.

It's a bit shocking to see that so far out of just over 600 people about 55 people picked the non-existent and utterly implausible DBCC CHECKCACHE, and about 175 picked the equally non-existent although less implausible sounding DBCC CHECKFILEGROUP; and it seems amazing that about 120 people thought that DBCC CHECKIDENT was something that DBCC CHECKDB would do. So I hope that people will learn from this question.


Tom, I was looking for DBCC ATTITUDE to see how I felt about the question but could not find it in the list. :-)

Not all gray hairs are Dinosaurs!
GilaMonster
GilaMonster
SSC Guru
SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)SSC Guru (234K reputation)

Group: General Forum Members
Points: 234277 Visits: 46368
L' Eomot Inversé (7/31/2013)
and about 175 picked the equally non-existent although less implausible sounding DBCC CHECKFILEGROUP;


http://msdn.microsoft.com/en-us/library/ms187332.aspx

DBCC CHECKFILEGROUP (Transact-SQL)

Checks the allocation and structural integrity of all tables and indexed views in the specified filegroup of the current database.


Although, since CheckFilegroup wasn't an answer, I suspect you meant CheckIntegrity, which indeed does not exist.

Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


Revenant
Revenant
SSChampion
SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)SSChampion (12K reputation)

Group: General Forum Members
Points: 12773 Visits: 5010
Interesting question, interesting discussion. Thanks, Steve!
pchirags
pchirags
SSCrazy
SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)SSCrazy (2.7K reputation)

Group: General Forum Members
Points: 2719 Visits: 616
kapil_kk (7/31/2013)
Hugo Kornelis (7/31/2013)
karuppusamy.kk (7/31/2013)
Please clarify my following concern about this question..

Why not DBCC CHECKIDENT?

The short and simple answer: because Microsoft didn't build DBCC CHECKDB to include CHECKIDENT.

The longer and more useful answer: DBCC CHECKDB is intended to test the integrity of the database. The errors it finds are the errors that can cause the database to go corrupt. If there are no corruptions in the database, DBCC CHECKDB will do nothing. If there are errors, if may attempt to repair them with as little side effects as possible.
Contrast that the DBCC CHECKIDENT. This doesn't test for corruption; it tests for specific situations in user tables that may be a sign of inconssitencies, but definitely not of corruption. If DBCC CHECKIDENT "repairs" issues it finds, it will have a side effect on the user data (i.e. it affects identity values to be assigned in the future).

Bottom line - DBCC CHECKIDENT is too different from the intended use of DBCC CHECKDB to be included in it.

+1 :-)


great explanation..
Tom Thomson
Tom Thomson
One Orange Chip
One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)One Orange Chip (26K reputation)

Group: General Forum Members
Points: 26529 Visits: 12506
GilaMonster (7/31/2013)
L' Eomot Inversé (7/31/2013)
and about 175 picked the equally non-existent although less implausible sounding DBCC CHECKFILEGROUP;


http://msdn.microsoft.com/en-us/library/ms187332.aspx

DBCC CHECKFILEGROUP (Transact-SQL)

Checks the allocation and structural integrity of all tables and indexed views in the specified filegroup of the current database.


Although, since CheckFilegroup wasn't an answer, I suspect you meant CheckIntegrity, which indeed does not exist.

Ouch! My fingers have betrayed me. AngryBlushExclamation
Yes, I did indeed mean CHECKINTEGRITY. But it's so hard to type non-existent commands, I'm almost surprised that my fingers managed CHECKCACHE without changing it to something like DBCCFREESESSIONCACHE.

Tom

Bangla
Bangla
SSCommitted
SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)SSCommitted (1.9K reputation)

Group: General Forum Members
Points: 1885 Visits: 180
Thanks for the question and discussion...
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search