Monthly Archives: July 2009

Clear all connections to a MSSQL database

Simple script to close all connections to a MSSQL database. USE master; GO ALTER DATABASE dbName SET SINGLE_USER WITH ROLLBACK IMMEDIATE; GO ALTER DATABASE dbName SET MULTI_USER; GO
Posted in MSSQL | Tagged | Comments closed