Kill all Sessions

less than 1 minute read | Updated:

USE master;
GO

ALTER DATABASE [DatabaseName]
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
ALTER DATABASE [DatabaseName]
SET MULTI_USER;
GO

Leave a Comment