{"id":236,"date":"2012-05-29T11:14:01","date_gmt":"2012-05-29T11:14:01","guid":{"rendered":"https:\/\/sqlserverlearner.azurewebsites.net\/2012\/05\/29\/dbcc-checktable-repair_rebuild\/"},"modified":"2012-05-29T11:14:01","modified_gmt":"2012-05-29T11:14:01","slug":"dbcc-checktable-repair_rebuild","status":"publish","type":"post","link":"https:\/\/sqlserverlearner.com\/2012\/05\/29\/dbcc-checktable-repair_rebuild\/","title":{"rendered":"dbcc checktable repair_rebuild"},"content":{"rendered":"
Syntax:<\/strong> This command checks the integrity of the table with respect to pages and structures and repairs it with no possible loss.<\/p>\n Example:<\/strong> 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]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2064],"tags":[2072],"class_list":["post-236","post","type-post","status-publish","format-standard","hentry","category-dbcc-commands","tag-dbcc-checktabletablename-repair_rebuild"],"_links":{"self":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts\/236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/comments?post=236"}],"version-history":[{"count":0,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts\/236\/revisions"}],"wp:attachment":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/media?parent=236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/categories?post=236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/tags?post=236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}
\n[sql]
\nDBCC CHECKTABLE(‘TableName’,REPAIR_REBUILD)
\n[\/sql]<\/p>\n
\n[sql]
\nALTER DATABASE AdventureWorksDW2008R2 SET SINGLE_USER
\nDBCC CHECKTABLE(‘DatabaseLog’,REPAIR_REBUILD)
\n[\/sql]<\/p>\n","protected":false},"excerpt":{"rendered":"