You must start an instance of SQL Server in single-user mode when you use DBCC CHECKDB/CHECKTABLE with REPAIR options (264154)
The information in this article applies to:
- Microsoft SQL Server 7.0
- Microsoft SQL Server 2000 (all editions)
- Microsoft SQL Server 2005 Standard Edition
- Microsoft SQL Server 2005 Express Edition
- Microsoft SQL Server 2005 Developer Edition
- Microsoft SQL Server 2005 Enterprise Edition
- Microsoft SQL Server 2005 Workgroup
This article was previously published under Q264154 SUMMARY
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:- Right-click the database name, and then click Properties.
- In the Properties dialog box, click Options.
- Select the single user option, and then click OK.
From Query Analyzer:
Use master
go
sp_dboption dbname, single, true
After the database is in single user mode, you can then run the DBCC CHECKDB or DBCC CHECKTABLE statements with the valid REPAIR options. 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:
Modification Type: | Major | Last Reviewed: | 12/10/2005 |
---|
Keywords: | kbinfo KB264154 |
---|
|