SQLUSA

Microsoft SQL Server 2000

Best Practices

 

How to check the integrity of a database?

 

In Query Analyzer, you position the database window to the subject database and execture:

dbcc checkdb

Execution time may span from minutes to hours. It is dependant on the size of the database and the configuration of the server.

The output looks like below on OK execution:

DBCC results for 'titles'.
There are 18 rows in 1 pages for object 'titles'.
CHECKDB found 0 allocation errors and 0 consistency errors in database 'pubs'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.

 

Best in the World in SQL Server Training
 
SQLUSA.com Home Page