Click here to Skip to main content
15,878,814 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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

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

DBCC CHECKDB to check errors in SQL Server database.


SQL
-- 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.
 
Share this answer
 
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/[^]
 
Share this answer
 
SQL
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)
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900