Killing Active Process in SQL Server 2008
In this article I will explain, how to kill active SQL Server DB Connections.
When you are performing database level operations, and that environment is shared between multiple users. Some errors may come, like- xxxx operation could not be performed, database is in use. This problem arises due to having active connections to your database. To kill current current process we have following method to kill active SQL Server DB Connections.
- Open SQL Server Management Studio.
- Open Object Explorer and go to Activity Monitor by right-click on the connection item.
- Select the process .
- Right click on the process which you want to kill and select Kill Process.
Another method to kill active SQL Server DB connections is using kill command. Run below query, it will show you all running processes.
To use "kill" keyword, simply type "kill" and type SPID. This command is used against SPID (Server Process ID). Space should be there between "kill" keyword and SPID.