Terminate (kill) a specific session on a server

Azure SQL Database provides a command to kill a specific session on a server.

Find session ID

First we will identify the session we want to end. We do this by listing all sessions on the server with this query:

exec sp_who

Result

Kill session

Now we will use the session ID (spid) to kill a session (111 in the example):

kill 111

Result

Azure SQL Database ends the provided session ID and rolls back all transactions that are associated with it. This operation may take a while.

Comments are only visible when the visitor has consented to statistics cookies. To see and add comments please accept statistics cookies.
0
There are no comments. Click here to write the first comment.