............ Have a nice day............

Monday 4 March 2013

Who changed my DB to single user mode?


In SQL 2000 server (developer edition with sp4).   Some databases keeps changing themselve into single user mode.
    
How to fix the problem permanently.
1. SQL Server does not automatically change databases to "single user" for any reason.  Some user process is   doing this.   Look at your SQL Agent jobs.
This was a fairly common thing for a DBA to do before doing maintenance.  You might have a scheduled backup or something which is doing this.
2. First you might want to run Profiler to capture what is causing the db to change into single user mode.
3. Generally, DBA may have to set a database to single-user mode for the maintenance actions. To stop single-user mode, run the following commands:
USE master;
Go
ALTER DATABASE AdventureWorks
SET MULTI_USER;
GO

No comments:

Post a Comment