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.
sp_dboption dbname, single, true
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:
DBCC execution completed. If DBCC printed error messages, contact your
The following example illustrates the problem:
- Start SQL Server from a command prompt by using:sqlservr -c -m
- Make a connection to SQL Server by using the Query Analyzer and then run the following code:
DBCC CHECKTABLE(Authors, REPAIR_REBUILD )
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.
Id. de artículo: 264154 - Última revisión: 10 jul. 2008 - Revisión: 1