Gouache painting of five running taps over basins with a large vermilion valve wheel above them

Kill All Processes for a Database in SQL Server

To kill all processes for a database, set it to SINGLE_USER with ROLLBACK IMMEDIATE and then back to MULTI_USER. This post tests that method against two open sessions, compares it with a KILL script and with RESTRICTED_USER, and explains when each one fits. It also covers what the killed sessions see and why you should not do this on production without asking.

Read More