The Database Console Commands (DBCC)

Those of you familiar with previous versions of SQL Server might know the DBCC statements as the Database Consistency Checker. All documentation now refers to them as the Database Console Commands, probably in deference to the fact that not all of them are used for database consistency checks.

Running DBCC statements are an integral part of database maintenance. Some, such as DBCC CHECKDB, can be run on a scheduled basis (this is the one the wizard runs) as a preventative measure, and others, such as DBCC SHRINKFILE, you can choose to run when needed. Table 17.1 lists some of the DBCC statements commonly used for database maintenance.

Table 17.1. Database Maintenance DBCC Statements
DBCC Function
CHECKDB

Get Microsoft® SQL Server™ 2000 Unleashed, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.