Kill All connection of a database
If you want to kill all the connection of a database at once then use below query.
you have to write your database name in place of DatabaseName (written in the below query)
USE master;
GO
ALTER DATABASE DatabaseName
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
ALTER DATABASE DatabaseName
SET MULTI_USER;
GO
Comments
Post a Comment