Easily Kill All Users In A Database

This simple script (ran from the master database) in Query Analyser removes all the requirements of collating currently connected spids to a database and the need to systematically open a cursor to kill each spid individually by simply placing the database offline, then immediately online.

2 (1)

2007-03-16 (first published: )

362 reads

Blogs

Daily Coping 24 Sept 2021

By

I started to add a daily coping tip to the SQLServerCentral newsletter and to...

Using environment variable files for SQL Server in containers

By

There are a whole bunch of environment variables that can be used to configure...

How to Design Backups in SQL Server?

By

The Recovery Point Objective (RPO) and Recovery Time Objective (RTO) are basic concepts related...

Read the latest Blogs

Forums

Volunteer For Something

By Grant Fritchey

Comments posted to this topic are about the item Volunteer For Something

Linked Server location?

By pkarandi

I have inherited a SQL Server that makes a call to a Linked Server...

Merge issue

By DaveBriCam

I have a merge stored procedure that may be conflicting with the structure of...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers