Select the product you need help with
You must start an instance of SQL Server in single-user mode when you use DBCC CHECKDB/CHECKTABLE with REPAIR optionsArticle ID: 264154 - View products that this article applies to. This article was previously published under Q264154 On This PageSUMMARY
The correct way to run a DBCC CHECKDB or DBCC CHECKTABLE statement with valid REPAIR options is to start SQL Server normally and then explicitly set the database in single user mode. You can do this from either the Enterprise Manager or the Query Analyzer. From Enterprise Manager:
If you are using SQL Server 2005For more information about how to start SQL Server in single-user mode, visit the following Microsoft Developer Network (MSDN) Web site:http://msdn2.microsoft.com/en-us/library/ms188236(en-US,SQL.90).aspx
(http://msdn2.microsoft.com/en-us/library/ms188236(en-US,SQL.90).aspx)
MORE INFORMATION
If you start SQL Server in single user mode (by using -m) and then you run a DBCC CHECK statement (CHECKDB or CHECKTABLE) with one of the valid REPAIR options, SQL Server generates this error message:
Repair statement not processed. Database needs to be in single user mode. DBCC execution completed. If DBCC printed error messages, contact your system administrator. The following example illustrates the problem:
This behavior is by design. When you start SQL Server in single user mode, you do not explicitly set the status of each database in single user mode. You only do that for the Master database. However, the DBCC CHECK statement checks the status for that specific database on which it is being run and if it is not set to single user the error message occurs. PropertiesArticle ID: 264154 - Last Review: February 22, 2007 - Revision: 4.3 APPLIES TO
| Article Translations
|


Back to the top








