Click here to Skip to main content
14,299,944 members
Rate this:
Please Sign up or sign in to vote.
See more:
Can any one explain about DBCC CHECKDB in detail.
I got to the Microsoft site also but I was not able to understand it there.
So can you explain me in a simple way..
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 2

Database Console Command(DBCC).
Check database(CHECKDB)(a particular database) for Errors.

DBCC CHECKDB to check errors in SQL Server database.


-- Check the current database.
DBCC CHECKDB;
GO
-- Check the AdventureWorks2012 database without nonclustered indexes.
DBCC CHECKDB (AdventureWorks2012, NOINDEX);
GO




read now. DBCC CHECKDB[^]
DBCC CHECKALLOC[^]
DBCC CHECKTABLE[^]

I hope you can understand now.
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

It is a DataBase Console Command that is also called DataBase Consistency Check.
It is used to maintain the integrity and consistency of the database.
It runns three of the following

DBCC CHECKALLOC
DBCC CHECKTABLE
DBCC CHECKCATLOG

These three commands are used for different purposes but all of them are done by executing DBCC CHECKDB.

You can go the following link for better information

http://www.mssqltips.com/sqlservertip/2399/minimize-performance-impact-of-sql-server-dbcc-checkdb/[^]
   
Rate this:
Please Sign up or sign in to vote.

Solution 1

This command is used to reset the identity fields on the table.whenever you delete rows,the identity column will not reset by default.

To reset the identity column,Run the following command:

DBCC CHECKIDENT ('[TestTable]', RESEED, 0)
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100