Syntax
DBCC CHECKALLOC [ ( 'database' | database_id | 0
[ , NOINDEX | , { REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD } ]
[WITH
{ [ ALL_ERRORMSGS ]
[ , NO_INFOMSGS ]
[ , TABLOCK ]
[ , ESTIMATEONLY ]
}
]
]
Key:
REPAIR_FAST | REPAIR_REBUILD | NOINDEX - deprecated options
REPAIR_ALLOW_DATA_LOSS - Use only as a last resort
Back up the database before you run this option.
database_name must be in single-user mode.
To find the repair level to use, run DBCC CHECKDB without a repair option.
The recommended and preferred way to repair errors is to restore from a known good backup.
-- Check disk space allocation for the current database.
DBCC CHECKALLOC;
GO
“For anybody, who changes his principles, depending on who he is dealing. That is not a man who can lead a nation” ~ Nelson Mandela
DBCC CHECKDB - Check allocation, and integrity of all objects.