# Database Discussions > MS SQL Server 7/MS SQL Server 2000 >  Database in single user mode after backup

## Jaana Lehtonen

Hi!

I have a problem with databases that are left in single user mode after transaction log backup.
I have a database maintenance plan job that backs up the transaction log and checks data and index linkage every hour.
Sometimes the job fails and when I look in the report file it says that it has tred to put the database in single user mode and failed because the database is in use and then in the next step it says that it cannot perform the operation because there already is a user in the database. 

Why is the database put in single user mode?
What can I do to avoid finding my databases in single user mode?


Below is a part of the report file:

[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 15089: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot change the &#39;single user&#39; option of a database while another user is in the database.
[1] Database BV Produktion: Check Data and Index Linkage...

    ** Execution Time: 0 hrs, 0 mins, 1 secs **

[2] Database BV Projektering: Check Data and Index Linkage...
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 924: [Microsoft][ODBC SQL Server Driver][SQL Server]Database &#39;BV Projektering&#39; is already open and can only have one user at a time.
[Microsoft][ODBC SQL Server Driver][SQL Server]Only the owner of object &#39;dms_user&#39; can run DBCC CHECKTABLE on it.
[Microsoft][ODBC SQL Server Driver][SQL Server]Database &#39;BV Projektering&#39; is already open and can only have one user at a time.
[Microsoft][ODBC SQL Server Driver][SQL Server]DBCC execution completed. If DBCC printed error messages, contact your system administrator.

    The following errors were found:

[Microsoft][ODBC SQL Server Driver][SQL Server]Database &#39;BV Projektering&#39; is already open and can only have one user at a time.
[Microsoft][ODBC SQL Server Driver][SQL Server]Only the owner of object &#39;dms_user&#39; can run DBCC CHECKTABLE on it.
[Microsoft][ODBC SQL Server Driver][SQL Server]Database &#39;BV Projektering&#39; is already open and can only have one user at a time.
[Microsoft][ODBC SQL Server Driver][SQL Server]DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    ** Execution Time: 0 hrs, 0 mins, 9 secs **

----------


## Phil McCormack

Just a guess, but is the maintenance plan (Integrity Tab) set to Check database integrity and to repair damage if found ?

It could be that the under these circumstances SQL is trying to set the DB in single user mode in order hav exclusive access to tables.

If you uncheck the (check database integrity) box and see what happens.  If this works, then schedule a DB Integrity check out-of-hours or once a week.

Sorry if this doesn&#39;t help.


------------
Jaana Lehtonen at 2/7/01 9:52:16 AM

Hi!

I have a problem with databases that are left in single user mode after transaction log backup.
I have a database maintenance plan job that backs up the transaction log and checks data and index linkage every hour.
Sometimes the job fails and when I look in the report file it says that it has tred to put the database in single user mode and failed because the database is in use and then in the next step it says that it cannot perform the operation because there already is a user in the database. 

Why is the database put in single user mode?
What can I do to avoid finding my databases in single user mode?


Below is a part of the report file:

[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 15089: [Microsoft][ODBC SQL Server Driver][SQL Server]Cannot change the &#39;single user&#39; option of a database while another user is in the database.
[1] Database BV Produktion: Check Data and Index Linkage...

    ** Execution Time: 0 hrs, 0 mins, 1 secs **

[2] Database BV Projektering: Check Data and Index Linkage...
[Microsoft SQL-DMO (ODBC SQLState: 42000)] Error 924: [Microsoft][ODBC SQL Server Driver][SQL Server]Database &#39;BV Projektering&#39; is already open and can only have one user at a time.
[Microsoft][ODBC SQL Server Driver][SQL Server]Only the owner of object &#39;dms_user&#39; can run DBCC CHECKTABLE on it.
[Microsoft][ODBC SQL Server Driver][SQL Server]Database &#39;BV Projektering&#39; is already open and can only have one user at a time.
[Microsoft][ODBC SQL Server Driver][SQL Server]DBCC execution completed. If DBCC printed error messages, contact your system administrator.

    The following errors were found:

[Microsoft][ODBC SQL Server Driver][SQL Server]Database &#39;BV Projektering&#39; is already open and can only have one user at a time.
[Microsoft][ODBC SQL Server Driver][SQL Server]Only the owner of object &#39;dms_user&#39; can run DBCC CHECKTABLE on it.
[Microsoft][ODBC SQL Server Driver][SQL Server]Database &#39;BV Projektering&#39; is already open and can only have one user at a time.
[Microsoft][ODBC SQL Server Driver][SQL Server]DBCC execution completed. If DBCC printed error messages, contact your system administrator.
    ** Execution Time: 0 hrs, 0 mins, 9 secs **

----------

