Bringing Database back from Single User to Multi User mode with active connections
Bringing Database back from Single User mode to Multi User mode for Database with active connection:
Some times you will need to bring a database back from single user mode.
If we issue the below command,
USE [master]
GO
ALTER DATABASE [AdventureWorks] SET multi_USER
GO
It errors out:
Msg 5064, Level 16, State 1, Line 1
Changes to the state or options of database 'AdventureWorks' cannot be made at this time. The database is in single-user mode, and a user is currently connected to it.
Msg 5069, Level 16, State 1, Line 1
ALTER DATABASE statement failed.
For conditions like this:
Use the below query to find out the active … Read the rest