i was wondering if there is a way to kill a range of SQL Connections on an Microsoft SQL DB.
If i want to kill a single session id i can use kill [session-id]; go;
.
If i want to kill all sessions i can switch the db mode with ALTER DATABASE [DB-NAME] SET SINGLE_USER WITHROLLBACK IMMEDIATE
But what if i want to kill session id range 60-100 for example, or all sessions from a specific Hostname or a specific username? Is there a simple way for this? I didn't found a solution with the "kill" command. Any ideas?