dbcc checktable repair_rebuild

Syntax:
[sql]
DBCC CHECKTABLE(‘TableName’,REPAIR_REBUILD)
[/sql]

This command checks the integrity of the table with respect to pages and structures and repairs it with no possible loss.

Example:
[sql]
ALTER DATABASE AdventureWorksDW2008R2 SET SINGLE_USER
DBCC CHECKTABLE(‘DatabaseLog’,REPAIR_REBUILD)
[/sql]

One thought on “dbcc checktable repair_rebuild

Leave a Reply

Your email address will not be published. Required fields are marked *