Article ID: 259551 - View products that this article applies to.
This article was previously published under Q259551
BUG #: 57804 (SQLBUG_70)
When you run a Database Maintenance Plan with the repair option, any minor problems may leave the database in single user mode.
This problem occurs when a Database Maintenance Plan includes data integrity checks on the indexes and the user has selected the Attempt to repair any minor problems check box. The Maintenance Plan runs the following code if the -CkDBRepair option is specified on the SQLMaint command line:
For the REPAIR_FAST option to work, the database needs to be in single user mode. For more information, refer to the following article in the Microsoft Knowledge Base:
247181This problem has occurred on computers with multiple CPUs in high stress or high activity situations. After the following command is issued:
(http://support.microsoft.com/kb/247181/EN-US/ )FIX: SQLMaint.exe -CkDBRepair Option Does Not Work Correctly
another connection is gaining access on that database before the following command can be issued:
This occurs because there is no guarantee that the connection that sets a database in single user mode will get into that database first. Therefore, the database is never removed from single user mode.
Here are two ways to work around this behavior:
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799For more information, contact your primary support provider.
(http://support.microsoft.com/kb/274799/ )INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0