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: )

359 reads

Blogs

Actual Difference Between EXISTS(SELECT 1 …), EXISTS(SELECT * …), and EXISTS(SELECT column …)

By

Is EXISTS(SELECT 1 ...) better than EXISTS(SELECT * ...)? Who would know better than...

ANSI_WARNINGS = OFF can break update statements with some SQL features

By

Working on a SQL 2017 database where an external, non-Microsoft application has direct access...

Bring Your Own Key to Azure SQL Database Managed Instance TDE

By

Last year Azure SQL Database Managed Instance saw the introduction of bring your own...

Read the latest Blogs

Forums

Towards an efficient interface between application and database

By Phil Factor

Comments posted to this topic are about the item Towards an efficient interface between...

How to handle date on temp table when is null or not ?

By ahmed_elbarbary.2010

How to handle date on temp table when is null or not ? I...

Recruitment question

By mcmiller1986

Thanks for fielding this question in advance: We are searching for a Microsoft SQL...

Visit the forum

Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers