DBCC CHECKTABLE(‘TableName’ REPAIR_REBUILD) – SQLSERVERLEARNER https://sqlserverlearner.com LEARN SQL SERVER ONLINE Tue, 29 May 2012 11:14:01 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.2 dbcc checktable repair_rebuild https://sqlserverlearner.com/2012/05/29/dbcc-checktable-repair_rebuild/ https://sqlserverlearner.com/2012/05/29/dbcc-checktable-repair_rebuild/#comments Tue, 29 May 2012 11:14:01 +0000 https://sqlserverlearner.azurewebsites.net/2012/05/29/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]

]]>
https://sqlserverlearner.com/2012/05/29/dbcc-checktable-repair_rebuild/feed/ 1