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.

alter database pubs set offline with rollback immediate
go
alter database pubs set online

Rate

2 (1)

Share

Share

Rate

2 (1)