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


DBCC CHECKDB


DBCC CHECKDB

Author
Message
Steve Jones
Steve Jones
SSC Guru
SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)SSC Guru (150K reputation)

Group: Administrators
Points: 150840 Visits: 19455
Comments posted to this topic are about the item DBCC CHECKDB

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
SQLRNNR
SQLRNNR
SSC Guru
SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)SSC Guru (68K reputation)

Group: General Forum Members
Points: 68699 Visits: 18570
Thanks Steve



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server, MVP


SQL RNNR

Posting Performance Based Questions - Gail Shaw

kapil_kk
kapil_kk
SSCertifiable
SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)

Group: General Forum Members
Points: 5474 Visits: 2768
Nice question,........
Thanks Steve :-)

_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
DivyaMohankumar
DivyaMohankumar
Grasshopper
Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)Grasshopper (17 reputation)

Group: General Forum Members
Points: 17 Visits: 14
Good question.... I wish to Share some of the points:-P:

->DBCC CHECKDB - Checks the logical and physical integrity of all the objects in the specified database.

->DBCC CHECKALLOC – Checks the consistency of disk space allocation structures for a specified database.

->DBCC CHECKTABLE – Checks the integrity of all the pages and structures that make up the table or indexed view.

->DBCC CHECKCATALOG – Checks for catalog consistency within the specified database. The database must be online.

Danny Ocean
Danny Ocean
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2246 Visits: 1549
DivyaMohankumar (7/30/2013)
Good question.... I wish to Share some of the points:-P:

->DBCC CHECKDB - Checks the logical and physical integrity of all the objects in the specified database.

->DBCC CHECKALLOC – Checks the consistency of disk space allocation structures for a specified database.

->DBCC CHECKTABLE – Checks the integrity of all the pages and structures that make up the table or indexed view.

->DBCC CHECKCATALOG – Checks for catalog consistency within the specified database. The database must be online.



Good question. And thanks divya for this information. :-)

Thanks
Vinay Kumar
-----------------------------------------------------------------
Keep Learning - Keep Growing !!!
www.GrowWithSql.com
karuppusamy.kk
karuppusamy.kk
SSC Journeyman
SSC Journeyman (78 reputation)SSC Journeyman (78 reputation)SSC Journeyman (78 reputation)SSC Journeyman (78 reputation)SSC Journeyman (78 reputation)SSC Journeyman (78 reputation)SSC Journeyman (78 reputation)SSC Journeyman (78 reputation)

Group: General Forum Members
Points: 78 Visits: 65
Hello Steve,

Please clarify my following concern about this question..

Why not DBCC CHECKIDENT?

Checks the current identity value for the specified table and, if needed, corrects the identity value.

Reference : http://msdn.microsoft.com/en-us/library/aa258817(v=sql.80).aspx


Regards,
K.K.Karuppusamy
sqlnaive
sqlnaive
SSCertifiable
SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)SSCertifiable (6.5K reputation)

Group: General Forum Members
Points: 6487 Visits: 2774
DivyaMohankumar (7/30/2013)
Good question.... I wish to Share some of the points:-P:

->DBCC CHECKDB - Checks the logical and physical integrity of all the objects in the specified database.

->DBCC CHECKALLOC – Checks the consistency of disk space allocation structures for a specified database.

->DBCC CHECKTABLE – Checks the integrity of all the pages and structures that make up the table or indexed view.

->DBCC CHECKCATALOG – Checks for catalog consistency within the specified database. The database must be online.



Definitely a simple good question for a recap. And good one liners from DivyaMohan. :-)
Michael Riemer
Michael Riemer
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3125 Visits: 656
Great reminder question - thanks Steve.
Hugo Kornelis
Hugo Kornelis
SSCoach
SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)SSCoach (19K reputation)

Group: General Forum Members
Points: 19177 Visits: 12426
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.


Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
kapil_kk
kapil_kk
SSCertifiable
SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)SSCertifiable (5.5K reputation)

Group: General Forum Members
Points: 5474 Visits: 2768
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 :-)

_______________________________________________________________
To get quick answer follow this link:
http://www.sqlservercentral.com/articles/Best+Practices/61537/
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