How To KILL Process in SQL Sever.
In organization Application Team, M.I.S Team,
Development Team (Transactions, such as ASP.NET & JAVA dependent tool) send
bulk of SQL
statements to process the request.
After the job execution, the process ID stays in the server
and waits for next command with sleeping status. Since this process does not go
away, next job adds another process and eventually, the server is overloaded
with these processes and dies.
Follow the below steps:
Login to SQL server & connect to Particular Instance as
shown below: Connect (Click on) <server Name> server
Go
to “Management “option-à expand à click on activity monitor
Right click (Activity Monitor) à
View Processesà
You can also query it: select
* from sys.sysprocesses ---à to get all process details.
Sp_who2 -à to
get detailed information about process. But don’t run regularly on Production
Server.
Once we click on View process, we will get following
process window.
It will show you;
1st column: Process Id (here it is showing process id
Starts from 51. Because 1 to 50 are system process & user process_id starts
from 51.
2nd column: Describes whether it is
system process or no. It’s recommended NOT to kill system process
3rd
column: User detail. NT Authority is : Wndow aunthentication Login
Sa is : SQL authentication login.
4th
column: Status about the process. Running—Running process at present.
Runable – About to run after
getting free resource from active process(Running)
Sleeping:
Finished processing or waiting for long time.
Suspended – Process finished it’s
work but still in resource panel. We have to kill this.
Now,
we will Kill Suspended process to free up our memory blocked by that Process(
Sp_id =60)
Select
that process; Right click on it to check Detail i.e. which query it is running.
Check Detail; It will show the query running on SQL
server.
Next à Kill Process.
Now you are able to kill the process…!
0 comments:
Post a Comment