{"id":82485,"date":"2021-06-25T11:21:18","date_gmt":"2021-06-25T11:21:18","guid":{"rendered":"https:\/\/www.stellarinfo.com\/blog\/?p=82485"},"modified":"2024-11-04T12:25:37","modified_gmt":"2024-11-04T12:25:37","slug":"dbcc-checkdb-repair-rebuild","status":"publish","type":"post","link":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/","title":{"rendered":"DBCC CHECKDB REPAIR_REBUILD with Example"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><?xml encoding=\"utf-8\" ?><p>As database administrators, you must be running the DBCC CHECKDB command to check your SQL database&rsquo;s physical and logical consistency. These checks may fail due to corruption in the database. If&nbsp;<a href=\"https:\/\/www.stellarinfo.com\/blog\/fix-sql-server-database-dbcc-checkdb-consistency-errors\/\" target=\"_blank\" rel=\"noreferrer noopener\"><u>DBCC CHECKDB reports consistency errors<\/u><\/a>, you must identify the root cause behind database corruption to find the best possible solution to fix the errors.&nbsp;<\/p><h2 class=\"wp-block-heading\" id=\"possible-reasons-behind-sql-database-corruption\"><strong>Possible Reasons Behind SQL Database Corruption<\/strong><\/h2><p>Following are the most common reasons leading to SQL Server database corruption:<\/p><ul class=\"wp-block-list\">\n<li><strong>Faulty Hardware: <\/strong>Check for defects in disk controllers, device drivers, or other hardware components. If the consistency errors are caused due to hardware problems, ensure that the configuration of the hardware device meets with the <u>Microsoft SQL Server Database Engine Input\/Output requirements<\/u>. Or else, contact your hardware vendor or device manufacturer to resolve the underlying hardware issues.<\/li>\n\n\n\n<li><strong>Bugs in the SQL Software:<\/strong> If you can&rsquo;t find any issue with the underlying hardware, check for software bugs, as Microsoft is known to cause index corruption or data loss while running an <a href=\"https:\/\/support.microsoft.com\/en-us\/topic\/fix-data-corruption-occurs-in-clustered-index-when-you-run-online-index-rebuild-in-sql-server-2012-or-sql-server-2014-075b0c04-1260-1716-6b9d-737ada4f8686\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"><u>online index rebuild in SQL Server 2012\/2014<\/u><\/a>. &nbsp;<\/li>\n\n\n\n<li><strong>Virus or Malware Attack: <\/strong>The SQL database files can get corrupted due to a virus or malware attack, turning the files inaccessible.<\/li>\n<\/ul><p>If hardware or software issues are not detected, the best solution to fix corruption is to restore the database from the most recent backup. If there is no good backup, you can fix the errors by running the DBCC CHECKDB command with a repair option needed to fix specific errors. The following section will discuss how to fix the database corruption errors when &lsquo;REPAIR_REBUILD&rsquo; is recommended as the minimum repair level to resolve all errors reported by DBCC CHECKDB.<\/p><h2 class=\"wp-block-heading\" id=\"how-to-fix-corrupt-sql-database-using-&lsquo;dbcc-checkdb-with-repair_rebuild&rsquo;?\"><strong>How to Fix Corrupt SQL Database Using &lsquo;DBCC CHECKDB With REPAIR_REBUILD&rsquo;?<\/strong><\/h2><p>The REPAIR_REBUILD command helps rebuild corrupt pages or repair missing rows in non-clustered indexes. You can use it to perform database repair &ldquo;without the possibility of data loss.&rdquo;<\/p><p>Before you run the &lsquo;DBCC CHECKDB REPAIR_REBUILD&rsquo; command, make sure to put the database in a SINGLE_USER mode by executing the below command:<\/p><pre class=\"wp-block-code command_container\"><code><strong>ALTER DATABASE your_dbname SET SINGLE_USER<\/strong><\/code><\/pre><p>This is important because repairing a SQL db and running a DBCC CHECKDB command are two separate operations. Also, a database is in MULTI-USER mode. And to fix it, you need to bring it in SINGLE_USER mode to avoid getting any errors.<\/p><p>Once the database is set to SINGLE_USER mode, run the following command to repair the database:<\/p><pre class=\"wp-block-code command_container\"><code><strong>DBCC CHECKDB('your_dbname', REPAIR_REBUILD)<\/strong><\/code><\/pre><p>Once the database gets repaired, set the database back to MULTI_USER mode:<\/p><pre class=\"wp-block-code command_container\"><code><strong>ALTER DATABASE your_dbname SET MULTI_USER<\/strong><\/code><\/pre><h3 class=\"wp-block-heading\" id=\"h-dbcc-checkdb-with-repair-rebuild-example\"><strong>DBCC CHECKDB with REPAIR_REBUILD Example<\/strong><strong><\/strong><\/h3><p>Here&rsquo;s an example that shows an error message recommending running &ldquo;repair_rebuild as the minimum repair level&rdquo; on the VLDB database.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"654\" height=\"152\" src=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/repair-rebuild-minimum-repair-1.png\" alt=\"Repair Rebuild Minimum Repair\" class=\"wp-image-82487 apply-gradient-on-post-images\" srcset=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/repair-rebuild-minimum-repair-1.png 654w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/repair-rebuild-minimum-repair-1-300x70.png 300w\" sizes=\"auto, (max-width: 654px) 100vw, 654px\" \/><\/figure>\n<\/div><p><strong>Follow these steps to resolve the table error:<\/strong><\/p><p><strong>Step 1:<\/strong> Open SQL Server Management Studio (SSMS) and run this command:<\/p><pre class=\"wp-block-code command_container\"><code><strong>ALTER DATABASE VLDB SET SINGLE_USER WITH ROLLBACK IMMEDIATE;<\/strong><\/code><\/pre><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"780\" height=\"701\" src=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/set-db-in-single-user-mode-2.png\" alt=\"Set DB In Single User Mode\" class=\"wp-image-82488 apply-gradient-on-post-images\" srcset=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/set-db-in-single-user-mode-2.png 780w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/set-db-in-single-user-mode-2-300x270.png 300w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/set-db-in-single-user-mode-2-768x690.png 768w\" sizes=\"auto, (max-width: 780px) 100vw, 780px\" \/><\/figure>\n<\/div><p><strong>Step 2:<\/strong> Once the db is in SINGLE_USER mode, right-click on <strong>Databases<\/strong>, and click <strong>Refresh<\/strong>.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"314\" height=\"452\" src=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/refresh-the-db-3.png\" alt=\"Refresh the DB\" class=\"wp-image-82489 apply-gradient-on-post-images\" srcset=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/refresh-the-db-3.png 314w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/refresh-the-db-3-208x300.png 208w\" sizes=\"auto, (max-width: 314px) 100vw, 314px\" \/><\/figure>\n<\/div><p><strong>Step 3:<\/strong> Now expand Databases by clicking on the <strong>&ldquo;+&rdquo;<\/strong>&nbsp;icon. You can see the <strong>&lsquo;VLDB&rsquo;<\/strong>&nbsp;is in SINGLE_USER mode.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"218\" height=\"574\" src=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/db-in-single-user-mode-4.png\" alt=\"DB In Single User Mode\" class=\"wp-image-82490 apply-gradient-on-post-images\" srcset=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/db-in-single-user-mode-4.png 218w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/db-in-single-user-mode-4-114x300.png 114w\" sizes=\"auto, (max-width: 218px) 100vw, 218px\" \/><\/figure>\n<\/div><p><strong>Step 4:<\/strong> Now, run the following DBCC CHECKDB repair rebuild command:<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"778\" height=\"290\" src=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair-rebuild-5.png\" alt=\"Dbcc Check DB Repair Rebuild\" class=\"wp-image-82491 apply-gradient-on-post-images\" srcset=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair-rebuild-5.png 778w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair-rebuild-5-300x112.png 300w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair-rebuild-5-768x286.png 768w\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" \/><\/figure>\n<\/div><p>If there are no errors, the query will execute successfully. If so, bring the db in MULTI_USER mode.<\/p><h2 class=\"wp-block-heading\" id=\"what-if-&lsquo;dbcc-checkdb-repair_rebuild&rsquo;-fails?\"><strong>What If &lsquo;DBCC CHECKDB REPAIR_REBUILD&rsquo; Fails?<\/strong><\/h2><p>The REPAIR_REBUILD option can only fix minor corruption errors. So, it may fail to resolve all the errors reported by CHECKDB and result in an error recommending &ldquo;REPAIR_ALLOW_DATA_LOSS as the minimum repair level&rdquo; as you can see in the image below.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1002\" height=\"240\" src=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/repair-allow_data-loss-as-minimum-repair-level-6.png\" alt=\"Repair Allow Data Loss As Minimum Repair Level\" class=\"wp-image-82492 apply-gradient-on-post-images\" srcset=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/repair-allow_data-loss-as-minimum-repair-level-6.png 1002w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/repair-allow_data-loss-as-minimum-repair-level-6-300x72.png 300w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/repair-allow_data-loss-as-minimum-repair-level-6-768x184.png 768w\" sizes=\"auto, (max-width: 1002px) 100vw, 1002px\" \/><\/figure>\n<\/div><p>Run the &ldquo;DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS&rdquo; command as a last resort to repair the database, as it involves data loss risk. A better alternative is to use a professional <a href=\"https:\/\/www.stellarinfo.com\/sql-database-repair.php\" target=\"_blank\" rel=\"noreferrer noopener\">SQL repair tool<\/a>.<\/p><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/cloud.stellarinfo.com\/StellarRepairforMSSQL-Blog.exe\"><img decoding=\"async\" src=\"https:\/\/www.stellarinfo.com\/images\/free-download-windows.png\" alt=\"Stellar\" class=\"wp-image-82121 apply-gradient-on-post-images\" style=\"width:252px;height:72px\"><\/a><\/figure>\n<\/div><p><strong>Stellar Repair for MS SQL software <\/strong>can help fix all types of SQL database corruption errors. It repairs the MDF file of the database and recovers all the objects, thereby helping you to restore the database to its original form without data loss. &nbsp;<\/p><h2 class=\"wp-block-heading\" id=\"conclusion\"><strong>Conclusion<\/strong><strong><\/strong><\/h2><p>If you get consistency errors from running the DBCC CHECKDB command, using the REPAIR_REBUILD option can help fix the errors without any data loss. However, it may fail to resolve all the consistency errors. You may have to run DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS to fix database corruption but remember, it may lead to data loss. Using <strong>Stellar Repair for MS SQL software<\/strong> can help you fix a severely corrupted database and restore it without any changes to its original form.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As database administrators, you must be running the DBCC CHECKDB command to&hellip; <a class=\"more-link\" href=\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/\">Continue reading <span class=\"screen-reader-text\">DBCC CHECKDB REPAIR_REBUILD with Example<\/span><\/a><\/p>\n","protected":false},"author":82,"featured_media":82498,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[10],"tags":[2028,2023,2024,2025,2027,2026],"class_list":["post-82485","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-recovery","tag-dbcc-checkdb-best-practices","tag-dbcc-checkdb-repair","tag-dbcc-checkdb-repair-example","tag-dbcc-checkdb-repair-rebuild","tag-dbcc-checkdb-repair_rebuild","tag-repair-rebuild-dbcc-checkdb-repair","entry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>DBCC CHECKDB REPAIR_REBUILD with Example<\/title>\n<meta name=\"description\" content=\"This blog discusses steps to perform SQL database repair by running DBCC CHECKDB with REPAIR_REBUILD command. It also outlines the possible reasons causing database corruption and ways to fix it before repairing the database.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"DBCC CHECKDB REPAIR_REBUILD with Example\" \/>\n<meta property=\"og:description\" content=\"This blog discusses steps to perform SQL database repair by running DBCC CHECKDB with REPAIR_REBUILD command. It also outlines the possible reasons causing database corruption and ways to fix it before repairing the database.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/\" \/>\n<meta property=\"og:site_name\" content=\"Stellar Data Recovery Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-25T11:21:18+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-04T12:25:37+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair_rebuild-with-example.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Monika Dadool\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Monika Dadool\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/\"},\"author\":{\"name\":\"Monika Dadool\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/#\/schema\/person\/02a465e9b5b4912eafedd1ae248558fd\"},\"headline\":\"DBCC CHECKDB REPAIR_REBUILD with Example\",\"datePublished\":\"2021-06-25T11:21:18+00:00\",\"dateModified\":\"2024-11-04T12:25:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/\"},\"wordCount\":749,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair_rebuild-with-example.jpg\",\"keywords\":[\"dbcc checkdb best practices\",\"dbcc checkdb repair\",\"dbcc checkdb repair example\",\"dbcc checkdb repair rebuild\",\"dbcc checkdb repair_rebuild\",\"repair rebuild dbcc checkdb repair\"],\"articleSection\":[\"SQL Database Repair\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/\",\"url\":\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/\",\"name\":\"DBCC CHECKDB REPAIR_REBUILD with Example\",\"isPartOf\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair_rebuild-with-example.jpg\",\"datePublished\":\"2021-06-25T11:21:18+00:00\",\"dateModified\":\"2024-11-04T12:25:37+00:00\",\"author\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/#\/schema\/person\/02a465e9b5b4912eafedd1ae248558fd\"},\"description\":\"This blog discusses steps to perform SQL database repair by running DBCC CHECKDB with REPAIR_REBUILD command. It also outlines the possible reasons causing database corruption and ways to fix it before repairing the database.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#primaryimage\",\"url\":\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair_rebuild-with-example.jpg\",\"contentUrl\":\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair_rebuild-with-example.jpg\",\"width\":1000,\"height\":600,\"caption\":\"Dbcc Checkdb Repair_Rebuild With Example\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.stellarinfo.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"DBCC CHECKDB REPAIR_REBUILD with Example\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/#website\",\"url\":\"https:\/\/www.stellarinfo.com\/blog\/\",\"name\":\"Stellar Data Recovery Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.stellarinfo.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/#\/schema\/person\/02a465e9b5b4912eafedd1ae248558fd\",\"name\":\"Monika Dadool\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/7d22d2cc256776033dcf284e9c6b96fcf19473429aa25ea91b3f7561ae5e8b7a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/7d22d2cc256776033dcf284e9c6b96fcf19473429aa25ea91b3f7561ae5e8b7a?s=96&d=mm&r=g\",\"caption\":\"Monika Dadool\"},\"description\":\"Monika Dadool is a Senior Content Writer at Stellar with over 5 years of experience in technical writing. She is a tech enthusiast and expert who specializes in writing about SQL Server, MySQL Server, MariaDB Server, Microsoft Access, Active Directory, email recovery, Microsoft 365, pattern recognition, machine learning, data recovery, file repair, and operating systems like Linux, Windows, and Mac. She also writes about accounting software such as QuickBooks and Sage 50, as well as web-scripting languages like HTML, JavaScript, Python, PHP, Visual Basic, ASP.NET, and AJAX. Monika is passionate about researching and exploring new technologies, and she enjoys developing engaging technical blogs that help organizations and database administrators resolve various issues. When she's not creating content, you can find her on social media, watching web series, reading books, or exploring new food recipes.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/monika-dadool-105a87163\/\"],\"url\":\"https:\/\/www.stellarinfo.com\/blog\/author\/monika\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"DBCC CHECKDB REPAIR_REBUILD with Example","description":"This blog discusses steps to perform SQL database repair by running DBCC CHECKDB with REPAIR_REBUILD command. It also outlines the possible reasons causing database corruption and ways to fix it before repairing the database.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/","og_locale":"en_US","og_type":"article","og_title":"DBCC CHECKDB REPAIR_REBUILD with Example","og_description":"This blog discusses steps to perform SQL database repair by running DBCC CHECKDB with REPAIR_REBUILD command. It also outlines the possible reasons causing database corruption and ways to fix it before repairing the database.","og_url":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/","og_site_name":"Stellar Data Recovery Blog","article_published_time":"2021-06-25T11:21:18+00:00","article_modified_time":"2024-11-04T12:25:37+00:00","og_image":[{"width":1000,"height":600,"url":"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair_rebuild-with-example.jpg","type":"image\/jpeg"}],"author":"Monika Dadool","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Monika Dadool","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#article","isPartOf":{"@id":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/"},"author":{"name":"Monika Dadool","@id":"https:\/\/www.stellarinfo.com\/blog\/#\/schema\/person\/02a465e9b5b4912eafedd1ae248558fd"},"headline":"DBCC CHECKDB REPAIR_REBUILD with Example","datePublished":"2021-06-25T11:21:18+00:00","dateModified":"2024-11-04T12:25:37+00:00","mainEntityOfPage":{"@id":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/"},"wordCount":749,"commentCount":0,"image":{"@id":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#primaryimage"},"thumbnailUrl":"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair_rebuild-with-example.jpg","keywords":["dbcc checkdb best practices","dbcc checkdb repair","dbcc checkdb repair example","dbcc checkdb repair rebuild","dbcc checkdb repair_rebuild","repair rebuild dbcc checkdb repair"],"articleSection":["SQL Database Repair"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/","url":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/","name":"DBCC CHECKDB REPAIR_REBUILD with Example","isPartOf":{"@id":"https:\/\/www.stellarinfo.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#primaryimage"},"image":{"@id":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#primaryimage"},"thumbnailUrl":"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair_rebuild-with-example.jpg","datePublished":"2021-06-25T11:21:18+00:00","dateModified":"2024-11-04T12:25:37+00:00","author":{"@id":"https:\/\/www.stellarinfo.com\/blog\/#\/schema\/person\/02a465e9b5b4912eafedd1ae248558fd"},"description":"This blog discusses steps to perform SQL database repair by running DBCC CHECKDB with REPAIR_REBUILD command. It also outlines the possible reasons causing database corruption and ways to fix it before repairing the database.","breadcrumb":{"@id":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#primaryimage","url":"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair_rebuild-with-example.jpg","contentUrl":"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2021\/06\/dbcc-checkdb-repair_rebuild-with-example.jpg","width":1000,"height":600,"caption":"Dbcc Checkdb Repair_Rebuild With Example"},{"@type":"BreadcrumbList","@id":"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.stellarinfo.com\/blog\/"},{"@type":"ListItem","position":2,"name":"DBCC CHECKDB REPAIR_REBUILD with Example"}]},{"@type":"WebSite","@id":"https:\/\/www.stellarinfo.com\/blog\/#website","url":"https:\/\/www.stellarinfo.com\/blog\/","name":"Stellar Data Recovery Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.stellarinfo.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.stellarinfo.com\/blog\/#\/schema\/person\/02a465e9b5b4912eafedd1ae248558fd","name":"Monika Dadool","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.stellarinfo.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/7d22d2cc256776033dcf284e9c6b96fcf19473429aa25ea91b3f7561ae5e8b7a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/7d22d2cc256776033dcf284e9c6b96fcf19473429aa25ea91b3f7561ae5e8b7a?s=96&d=mm&r=g","caption":"Monika Dadool"},"description":"Monika Dadool is a Senior Content Writer at Stellar with over 5 years of experience in technical writing. She is a tech enthusiast and expert who specializes in writing about SQL Server, MySQL Server, MariaDB Server, Microsoft Access, Active Directory, email recovery, Microsoft 365, pattern recognition, machine learning, data recovery, file repair, and operating systems like Linux, Windows, and Mac. She also writes about accounting software such as QuickBooks and Sage 50, as well as web-scripting languages like HTML, JavaScript, Python, PHP, Visual Basic, ASP.NET, and AJAX. Monika is passionate about researching and exploring new technologies, and she enjoys developing engaging technical blogs that help organizations and database administrators resolve various issues. When she's not creating content, you can find her on social media, watching web series, reading books, or exploring new food recipes.","sameAs":["https:\/\/www.linkedin.com\/in\/monika-dadool-105a87163\/"],"url":"https:\/\/www.stellarinfo.com\/blog\/author\/monika\/"}]}},"_links":{"self":[{"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/posts\/82485","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/comments?post=82485"}],"version-history":[{"count":18,"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/posts\/82485\/revisions"}],"predecessor-version":[{"id":174186,"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/posts\/82485\/revisions\/174186"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/media\/82498"}],"wp:attachment":[{"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/media?parent=82485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/categories?post=82485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/tags?post=82485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}