Article ID: 175789 - Last Review: March 14, 2006 - Revision: 4.0 FIX: Rebuilding Indexes with SQLMaint May Cause Incorrect DatabaseThis article was previously published under Q175789
BUG #: 16955 (WINDOWS: 6.5)
SYMPTOMS
When you attempt to rebuild indexes with the Database Maintenance Wizard
(Sqlmaint.exe) or execute DBCC DBREINDEX on at least three tables that have
at least one index per table, and then attempt to use sp_dboption to put
that database in single user mode, you will get the following error:
Msg 3508, Level 16, State 1, Server NTJTK1, Line 1 Attempt to set 'pubs' database to single user mode failed because the usage count is 4. Make sure that no other users are currently using this database and rerun CHECKPOINT. CAUSE
When the Database Maintenance Wizard is run directly or as a scheduled task
that requests a rebuild of indexes, such as the following, it actually
executes a DBCC DBREINDEX for each table in that database:
WORKAROUND
To work around this problem, put the database in single user mode before
running the Database Maintenance Wizard (Sqlmaint.exe). Also, you can clear
the usage count by stopping and restarting SQL Server.
STATUS
Microsoft has confirmed this to be a problem in SQL Server 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base: 197177
(http://support.microsoft.com/kb/197177/
)
INF: How to Obtain SQL Server 6.5 Service Pack 5a For more information, contact your primary support provider.
MORE INFORMATION
The following SQL script demonstrates the problem:
| Article Translations
|

Back to the top
