• 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..