Thread: SQL Server 2005
View Single Post
  #29 (permalink)  
Old 10-27-2007, 02:51 AM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Default DBCC CHECKDB SQL Server 2005

DBCC CHECKDB - Check the allocation, and integrity of all objects in a database.

Syntax
DBCC CHECKDB
[( 'database' | database_id | 0
[ , NOINDEX
REPAIR_ALLOW_DATA_LOSS
REPAIR_FAST
REPAIR_REBUILD]
)]
[WITH
{
[ALL_ERRORMSGS ] [ , NO_INFOMSGS ] [ , TABLOCK ]
[, ESTIMATEONLY ] [ , { PHYSICAL_ONLY | DATA_PURITY } ]
}
]

Key:
NOINDEX - Skip intensive checks of nonclustered indexes for user tables
REPAIR_ALLOW_DATA_LOSS - Try to repair all reported errors.
REPAIR_REBUILD - Perform all repairs that can be performed without risk of data loss.
ALL_ERRORMSGS - Return all reported errors per object, default = first 200 errors.
TABLOCK - Obtain locks instead of using an internal database snapshot.
this limits the checks that are performed.
ESTIMATEONLY - Display the estimated amount of tempdb space that would be required.
PHYSICAL_ONLY - Limits the checking to the integrity of the physical structure
DATA_PURITY - Check the database for column values that are not valid or out-of-range.

Example

-- Check the current database.
DBCC CHECKDB;
GO
__________________
The KINGMAKER
Makes Every Thing Possible

Stuffs (My Blog)
Reply With Quote