Category: SQL Server
view more software Tips and Tricks
Updated: 10/17/2011 08:10 AM
Author: Shiju Mathews
Database Administrator changes the Databases to SINGLE_USER Mode for serious updates or for Database maintenances. Also when we are trying to drop a database in use it is better to change the database mode to single user mode and drop it. Use the following script the during the database to SINGLE_USER Mode
Here option ‘WITH ROLLBACK IMMEDIATE’ in the first ALTER DATABASE statement will be rolled back all incomplete transactions and disconnect any other connections to the [CourtesyIndiaDB] database immediately.
The database can change to “Multi_User” Mode by using the script.