{"id":48632,"date":"2020-01-07T06:24:43","date_gmt":"2020-01-07T06:24:43","guid":{"rendered":"https:\/\/www.stellarinfo.com\/blog\/?p=48632"},"modified":"2024-11-04T12:25:06","modified_gmt":"2024-11-04T12:25:06","slug":"how-to-repair-sql-database-using-dbcc-checkdb-command","status":"publish","type":"post","link":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/","title":{"rendered":"How to Repair SQL Database using DBCC CHECKDB Command?"},"content":{"rendered":"<?xml encoding=\"utf-8\" ?><?xml encoding=\"utf-8\" ?><p>Database Console Command (DBCC) commands are used for database management and administration in SQL Server. The DBCC CHECKDB command is used to check the logical and physical integrity of SQL database. It helps identify and resolve corruption-related and structural issues in the SQL database.<\/p><h2 class=\"wp-block-heading\" id=\"how-the-dbcc-checkdb-command-works?\"><strong>How the DBCC CHECKDB Command Works?<\/strong><\/h2><p>The command thoroughly scans the database and performs integrity checks and other structural checks. If any of these checks fail, it displays <a href=\"https:\/\/www.stellarinfo.com\/blog\/fix-sql-server-database-dbcc-checkdb-consistency-errors\/\" target=\"_blank\" rel=\"noreferrer noopener\">consistency errors<\/a> indicating issues in the database and also recommend appropriate repair option. Let&rsquo;s take a look at the syntax of DBCC CHECKDB command.<\/p><pre class=\"wp-block-code command_container\"><code>DBCC CHECKDB&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp; [ ( db_name | db_id | 0&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ , NOINDEX&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | , { REPAIR_ALLOW_DATA_LOSS | REPAIR_FAST | REPAIR_REBUILD } ]&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp; ) ]&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp; [ WITH&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ ALL_ERRORMSGS ]&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ , EXTENDED_LOGICAL_CHECKS ]&nbsp;&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ , NO_INFOMSGS ]&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ , TABLOCK ]&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ , ESTIMATEONLY ]&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ , { PHYSICAL_ONLY | DATA_PURITY } ]&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; [ , MAXDOP&nbsp; = number_of_processors ]&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;\n&nbsp;&nbsp;&nbsp; ]&nbsp;&nbsp;&nbsp;\n]<\/code><\/pre><p>Now, let&rsquo;s understand the various options used in the above DBCC CHECKDB command.<\/p><ul class=\"wp-block-list\">\n<li><strong>database_name | database_id | 0:&nbsp;<\/strong>Specifies the name or ID of the database against which you need to run integrity checks. If the &lsquo;database_name&rsquo; or &lsquo;id&rsquo; is not specified and &lsquo;0&rsquo; is specified, the current database will be used by default.<\/li>\n\n\n\n<li><strong>NOINDEX:<\/strong>&nbsp;Performs only logical checks to reduce the total execution time. It does not include non-clustered indexes in the checks.<\/li>\n\n\n\n<li><strong>REPAIR_FAST:&nbsp;<\/strong>This option does not perform any repair actions. It helps maintain syntax for backward compatibility.<strong>&nbsp;<\/strong><\/li>\n\n\n\n<li><a href=\"https:\/\/www.stellarinfo.com\/blog\/dbcc-checkdb-repair-rebuild\/\" target=\"_blank\" rel=\"noreferrer noopener\">REPAIR_REBUILD<\/a><strong>:&nbsp;<\/strong><em> <\/em>Helps repair database without any data loss. It can be used to repair missing rows in non-clustered indexes and for rebuilding an index.<\/li>\n\n\n\n<li><strong>REPAIR_ALLOW_DATA_LOSS:&nbsp;<\/strong>This option tries to fix all the reported issues and errors. Use this option as a last resort as it can lead to data loss.&nbsp;<\/li>\n\n\n\n<li><strong>ALL_ERRORMSGS:&nbsp;<\/strong>This argument displays all the error messages for each object.<\/li>\n\n\n\n<li><strong>EXTENDED_LOGICAL_CHECKS:&nbsp;<\/strong>Use this option to perform additional checks.<\/li>\n\n\n\n<li><strong>NO_INFOMSGS:&nbsp;<\/strong>DBCC output displays informational messages that are not related to the consistency errors. This option turns off the informational messages.<\/li>\n\n\n\n<li><strong>TABLOCK:&nbsp;<\/strong>Uses locks rather than internal database snapshot to perform consistency checks on the database.<\/li>\n\n\n\n<li><strong>ESTIMATEONLY:&nbsp;<\/strong>Specifies the estimated space required by the &lsquo;tempdb&rsquo; database for executing the CHECKDB command.<\/li>\n\n\n\n<li><strong>PHYSICAL_ONLY:&nbsp;<\/strong>Limits consistency checks on the physical structure of the database page, reducing runtime for DBCC CHECKDB on large databases.<\/li>\n\n\n\n<li><strong>DATA_PURITY:<\/strong>&nbsp;Helps check database for invalid or out-of-range column values.<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"steps-to-repair-sql-database-using-the-dbcc-checkdb-command\"><strong>Steps to Repair SQL Database using the DBCC CHECKDB Command<\/strong><\/h2><p>To run the DBCC CHECKDB command, make sure you have the administrative privileges. Then, open the SQL Server Management Studio (SSMS) and follow these steps:<\/p><blockquote class=\"note_alert\">\n<p><strong><em>Note:&nbsp;<\/em><\/strong><em>We will be using database_name as Dbtesting. Make sure to replace &lsquo;Dbtesting&rsquo; with the name of your database.<\/em><\/p>\n<\/blockquote><h3 class=\"wp-block-heading\"><strong>Step 1: Set Database to Emergency Mode<\/strong><\/h3><p>If the database is inaccessible, first change the database status to EMERGENCY mode. This will provide read-only access to the administrator. To put the database in EMERGENCY mode, run the following query in SSMS:<\/p><pre class=\"wp-block-code command_container\"><code>ALTER DATABASE [Dbtesting] SET EMERGENCY<\/code><\/pre><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"471\" src=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/1-set-database-into-emergency-mode-1024x471.png\" alt=\"set database into emergency mode\" class=\"wp-image-48633 apply-gradient-on-post-images\" srcset=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/1-set-database-into-emergency-mode-1024x471.png 1024w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/1-set-database-into-emergency-mode-300x138.png 300w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/1-set-database-into-emergency-mode-768x353.png 768w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/1-set-database-into-emergency-mode.png 1119w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div><h3 class=\"wp-block-heading\"><strong>Step 2: Check Database for Corruption Errors<\/strong><\/h3><p>After setting the database to EMERGENCY mode, execute the following command to check the database for corruption errors:<\/p><pre class=\"wp-block-code command_container\"><code>DBCC CHECKDB (Dbtesting) <\/code><\/pre><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"690\" height=\"488\" src=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/2-Running-DBCC-command.png\" alt=\"DBCC CHECKDB (Dbtesting) \" class=\"wp-image-48644 apply-gradient-on-post-images\" srcset=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/2-Running-DBCC-command.png 690w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/2-Running-DBCC-command-300x212.png 300w\" sizes=\"auto, (max-width: 690px) 100vw, 690px\" \/><\/figure>\n<\/div><p>If the DBCC CHECKDB command detects any errors or corruption in the database, it will recommend an appropriate repair option.<\/p><h3 class=\"wp-block-heading\"><strong>Step 3: Set Database to SINGLE_USER Mode<\/strong><\/h3><p>Before using the repair option, you need to put the database in SINGLE_USER mode to prevent other users from modifying the data during the repair process.&nbsp;To set the database to SINGLE_USER mode, run the following T-SQL query in SSMS:<\/p><pre class=\"wp-block-code command_container\"><code>ALTER DATABASE Dbtesting SET SINGLE_USER <\/code><\/pre><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"959\" height=\"249\" src=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/6.png\" alt=\"ALTER DATABASE Dbtesting SET SINGLE_USER\" class=\"wp-image-48649 apply-gradient-on-post-images\" srcset=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/6.png 959w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/6-300x78.png 300w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/6-768x199.png 768w\" sizes=\"auto, (max-width: 959px) 100vw, 959px\" \/><\/figure>\n<\/div><h3 class=\"wp-block-heading\"><strong>Step 4: Repair the Database<\/strong><\/h3><p>After setting the database to SINGLE_USER mode, run the command with the REPAIR option recommended by DBCC CHECKDB command.&nbsp;If it shows an error message recommending to run the REPAIR_REBUILD as the minimum repair level, then run the DBCC CHECKDB command with REPAIR_REBUILD option as given below:<\/p><pre class=\"wp-block-code command_container\"><code>DBCC CHECKDB (' Dbtesting ', REPAIR_REBUILD)\nGO<\/code><\/pre><p>This command will rebuild the database without any data loss. It can repair missing rows in non-clustered indexes and help in fixing minor corruption errors. However, it is a time-consuming option.<\/p><p>Alternatively, you can use the REPAIR_FAST with the command as given below:<\/p><pre class=\"wp-block-code command_container\"><code>DBCC CHECKDB (' Dbtesting ', REPAIR_FAST)\nGO<\/code><\/pre><p>This repair option only maintains backward compatibility syntax and does not perform any repair actions.<\/p><p>If the above repair options fail or the DBCC CHECKDB command recommended using the REPAIR_ALLOW_DATA_LOSS repair option, then run the DBCC CHECKDB command as given below:<\/p><pre class=\"wp-block-code command_container\"><code>DBCC CHECKDB (N &rsquo;Dbtesting&rsquo;, REPAIR_ALLOW_DATA_LOSS) WITH ALL_ERRORMSGS, NO_INFOMSGS; \nGO<\/code><\/pre><div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"653\" height=\"394\" src=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/7.png\" alt=\"REPAIR_ALLOW_DATA_LOSS\" class=\"wp-image-48650 apply-gradient-on-post-images\" srcset=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/7.png 653w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/7-300x181.png 300w, https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/7-407x247.png 407w\" sizes=\"auto, (max-width: 653px) 100vw, 653px\" \/><\/figure>\n<\/div><p>The REPAIR_ALLOW_DATA_LOSS repair option helps in repairing all reported errors in the SQL server database but it causes data loss. In fact, Microsoft recommends using the REPAIR_ALLOW_DATA_LOSS option as a last resort.<\/p><h3 class=\"wp-block-heading\"><strong>Step 5: Set Database to MULTI_USER Mode<\/strong><\/h3><p>After successfully repairing the database, set the database to MULTI_USER mode by executing the following command:<\/p><pre class=\"wp-block-code command_container\"><code>ALTER DATABASE Dbtesting SET MULTI_USER<\/code><\/pre><h2 class=\"wp-block-heading\" id=\"downsides-of-dbcc-checkdb-command\"><strong>Downsides of DBCC CHECKDB Command<\/strong><\/h2><p>Though the DBCC CHECKDB command can fix database consistency issues, you have to consider the following downsides when using the command with the REPAIR_ALLOW_DATA_LOSS option:<\/p><ul class=\"wp-block-list\">\n<li>It may deallocate rows or pages when repairing the database. Deallocated data can sometimes become unrecoverable.&nbsp;<\/li>\n\n\n\n<li>It may leave your database in a logically inconsistent state.<\/li>\n\n\n\n<li>You may require to use this command multiple times to fix all errors associated with SQL database. It is a time-consuming process.<\/li>\n\n\n\n<li>It does not guarantee complete data recovery.<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"an-alternative-to&nbsp;dbcc-checkdb-command\"><strong>An Alternative to&nbsp;DBCC CHECKDB Command<\/strong><\/h2><p>To overcome the downsides of the DBCC CHEKDB command and repair the corrupt SQL database with complete integrity, you can use a specialized MS SQL repair software, such as&nbsp;Stellar Repair for MS SQL.&nbsp;The software repairs severely corrupt MS SQL database and restores all its components. The&nbsp;<a href=\"https:\/\/www.stellarinfo.com\/sql-recovery.php\" target=\"_blank\" rel=\"noreferrer noopener\">SQL recovery software<\/a>&nbsp;helps reinstate access to the database with minimal manual efforts and time.<\/p><p><strong>Key Features:<\/strong><\/p><ul class=\"wp-block-list\">\n<li>Repairs both MDF and NDF database files<\/li>\n\n\n\n<li>Recovers all database components, including tables, keys, indexes, stored procedures, etc.<\/li>\n\n\n\n<li>Allows&nbsp;<a href=\"https:\/\/www.stellarinfo.com\/support\/kb\/index.php\/article\/recover-sql-deleted-records\" target=\"_blank\" rel=\"noreferrer noopener\">recovery of deleted records<\/a><\/li>\n\n\n\n<li>Recovers SQL tables with PAGE and ROW compression<\/li>\n\n\n\n<li>Supports selective recovery of database objects<\/li>\n\n\n\n<li>Offers preview of recoverable database objects before saving<\/li>\n\n\n\n<li>Saves the repaired database to a new or live database and formats like CSV, HTML, and XLS<\/li>\n\n\n\n<li>Supports SQL Server database 2022, 2019, 2017, 2016, 2014, 2012, and lower versions<\/li>\n\n\n\n<li>Compatible with both Windows and Linux operating systems<\/li>\n<\/ul><h2 class=\"wp-block-heading\" id=\"conclusion\"><strong>Conclusion<\/strong><\/h2><p>If your SQL database is corrupted, you can use the DBCC CHECKDB command to check and repair it. Above, we have explained how to use the DBCC CHECKDB command to repair SQL database. However, using the DBCC CHECKDB command with REPAIR_ALLOW_DATA_LOSS involves risk of data loss. To repair the corrupt database without data loss, you can use a <a href=\"https:\/\/www.stellarinfo.com\/sql-recovery.php\" target=\"_blank\" rel=\"noreferrer noopener\">specialized MS SQL repair software<\/a><strong>&nbsp;<\/strong>such as Stellar Repair for MS SQL. The software helps retrieve all the SQL database components, including tables, deleted table records, indexes, views, etc. You can free download the software to evaluate its functionality and efficacy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Database Console Command (DBCC) commands are used for database management and administration&hellip; <a class=\"more-link\" href=\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/\">Continue reading <span class=\"screen-reader-text\">How to Repair SQL Database using DBCC CHECKDB Command?<\/span><\/a><\/p>\n","protected":false},"author":82,"featured_media":171729,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-48632","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-recovery","entry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Repair SQL Database using DBCC CHECKDB Command?<\/title>\n<meta name=\"description\" content=\"This post explains using DBCC CHECKDB to repair SQL databases and mentions specialized MS SQL repair software that fixes corrupt databases in a few simple steps without data loss.\" \/>\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\/how-to-repair-sql-database-using-dbcc-checkdb-command\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Repair SQL Database using DBCC CHECKDB Command?\" \/>\n<meta property=\"og:description\" content=\"This post explains using DBCC CHECKDB to repair SQL databases and mentions specialized MS SQL repair software that fixes corrupt databases in a few simple steps without data loss.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/\" \/>\n<meta property=\"og:site_name\" content=\"Stellar Data Recovery Blog\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-07T06:24:43+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-04T12:25:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/repair-MS-SQL-Database-using-DBCC-CHECKDB-Command.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=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/\"},\"author\":{\"name\":\"Monika Dadool\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/#\/schema\/person\/02a465e9b5b4912eafedd1ae248558fd\"},\"headline\":\"How to Repair SQL Database using DBCC CHECKDB Command?\",\"datePublished\":\"2020-01-07T06:24:43+00:00\",\"dateModified\":\"2024-11-04T12:25:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/\"},\"wordCount\":1113,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/repair-MS-SQL-Database-using-DBCC-CHECKDB-Command.jpg\",\"articleSection\":[\"SQL Database Repair\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/\",\"url\":\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/\",\"name\":\"How to Repair SQL Database using DBCC CHECKDB Command?\",\"isPartOf\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/repair-MS-SQL-Database-using-DBCC-CHECKDB-Command.jpg\",\"datePublished\":\"2020-01-07T06:24:43+00:00\",\"dateModified\":\"2024-11-04T12:25:06+00:00\",\"author\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/#\/schema\/person\/02a465e9b5b4912eafedd1ae248558fd\"},\"description\":\"This post explains using DBCC CHECKDB to repair SQL databases and mentions specialized MS SQL repair software that fixes corrupt databases in a few simple steps without data loss.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#primaryimage\",\"url\":\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/repair-MS-SQL-Database-using-DBCC-CHECKDB-Command.jpg\",\"contentUrl\":\"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/repair-MS-SQL-Database-using-DBCC-CHECKDB-Command.jpg\",\"width\":1000,\"height\":600,\"caption\":\"Repair MS SQL Database using DBCC CHECKDB Command\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.stellarinfo.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Repair SQL Database using DBCC CHECKDB Command?\"}]},{\"@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":"How to Repair SQL Database using DBCC CHECKDB Command?","description":"This post explains using DBCC CHECKDB to repair SQL databases and mentions specialized MS SQL repair software that fixes corrupt databases in a few simple steps without data loss.","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\/how-to-repair-sql-database-using-dbcc-checkdb-command\/","og_locale":"en_US","og_type":"article","og_title":"How to Repair SQL Database using DBCC CHECKDB Command?","og_description":"This post explains using DBCC CHECKDB to repair SQL databases and mentions specialized MS SQL repair software that fixes corrupt databases in a few simple steps without data loss.","og_url":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/","og_site_name":"Stellar Data Recovery Blog","article_published_time":"2020-01-07T06:24:43+00:00","article_modified_time":"2024-11-04T12:25:06+00:00","og_image":[{"width":1000,"height":600,"url":"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/repair-MS-SQL-Database-using-DBCC-CHECKDB-Command.jpg","type":"image\/jpeg"}],"author":"Monika Dadool","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Monika Dadool","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#article","isPartOf":{"@id":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/"},"author":{"name":"Monika Dadool","@id":"https:\/\/www.stellarinfo.com\/blog\/#\/schema\/person\/02a465e9b5b4912eafedd1ae248558fd"},"headline":"How to Repair SQL Database using DBCC CHECKDB Command?","datePublished":"2020-01-07T06:24:43+00:00","dateModified":"2024-11-04T12:25:06+00:00","mainEntityOfPage":{"@id":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/"},"wordCount":1113,"commentCount":0,"image":{"@id":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#primaryimage"},"thumbnailUrl":"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/repair-MS-SQL-Database-using-DBCC-CHECKDB-Command.jpg","articleSection":["SQL Database Repair"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/","url":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/","name":"How to Repair SQL Database using DBCC CHECKDB Command?","isPartOf":{"@id":"https:\/\/www.stellarinfo.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#primaryimage"},"image":{"@id":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#primaryimage"},"thumbnailUrl":"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/repair-MS-SQL-Database-using-DBCC-CHECKDB-Command.jpg","datePublished":"2020-01-07T06:24:43+00:00","dateModified":"2024-11-04T12:25:06+00:00","author":{"@id":"https:\/\/www.stellarinfo.com\/blog\/#\/schema\/person\/02a465e9b5b4912eafedd1ae248558fd"},"description":"This post explains using DBCC CHECKDB to repair SQL databases and mentions specialized MS SQL repair software that fixes corrupt databases in a few simple steps without data loss.","breadcrumb":{"@id":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#primaryimage","url":"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/repair-MS-SQL-Database-using-DBCC-CHECKDB-Command.jpg","contentUrl":"https:\/\/www.stellarinfo.com\/blog\/wp-content\/uploads\/2020\/01\/repair-MS-SQL-Database-using-DBCC-CHECKDB-Command.jpg","width":1000,"height":600,"caption":"Repair MS SQL Database using DBCC CHECKDB Command"},{"@type":"BreadcrumbList","@id":"https:\/\/www.stellarinfo.com\/blog\/how-to-repair-sql-database-using-dbcc-checkdb-command\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.stellarinfo.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to Repair SQL Database using DBCC CHECKDB Command?"}]},{"@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\/48632","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=48632"}],"version-history":[{"count":60,"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/posts\/48632\/revisions"}],"predecessor-version":[{"id":173844,"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/posts\/48632\/revisions\/173844"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/media\/171729"}],"wp:attachment":[{"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/media?parent=48632"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/categories?post=48632"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.stellarinfo.com\/blog\/wp-json\/wp\/v2\/tags?post=48632"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}