denrepo

SQL ServerSessions

Kill a session

Ends a session and rolls back its open transaction. A large rollback can take as long as the work did; check progress with KILL <id> WITH STATUSONLY.

Changes data

Not yet verified. How scripts are tested

This script changes the database. Check the names and values before you run it.
b-mssql-kill.sql
1-- Replace 53 with the session_id to end2KILL 53;3 4-- Check rollback progress5KILL 53 WITH STATUSONLY;

Paste it into your query tool.

Open in denrepo

More SQL Server scripts: Sessions