Solved

How to terminate a processes in MS SQL Server

Posted on 2007-11-27
10
1,128 Views
Last Modified: 2008-09-08
Hi All,
I am not able to terminate a process which is locking more than 2 day's. I have tried to terminate the process, but I cant. Still the job is running. This process lock other processes.

How could i terminate the process without reboot?
0
Comment
Question by:Srikanthsubramanian
  • 2
  • 2
  • 2
  • +2
10 Comments
 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 20356467
In SQL Query Analyzer run command KILL. Ex:
Kill [ProcessNumber]
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 20356507
>I have tried to terminate the process,
How did you try ? Did you use "KILL"  statement , otherwise try it

as a second option, stop SQL Server Agent service

and if it is still running, restart the SQLServr service  or else restart the machine.
0
 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 20356551
You  must be careful if it's a production enviroment and you going to stop SQL Server Agent or SQL Server service. And be more careful if you have more databases in that instance. You'll stop ALL jobs and ALL databases will became offline.
0
 

Author Comment

by:Srikanthsubramanian
ID: 20356585
Hi am expecting alternate option. I have planed to restart the service end of day. Is there any way to terminate the process without reboot?
0
Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

 
LVL 5

Expert Comment

by:MrNetic
ID: 20356609
Srikanthsubramanian,

You should check if it is in a middle of a rollback, you could make inconcistencies in the DB...
What is the outpup of KILL SPID WITHSTATUSONLY .
0
 
LVL 5

Accepted Solution

by:
MrNetic earned 125 total points
ID: 20356642
What is the outpup of KILL SPID WITH STATUSONLY .
What is the SQL SERVER VERSION ( select @@version )?
0
 
LVL 7

Assisted Solution

by:macentrap
macentrap earned 125 total points
ID: 20356666
along with MrNetic advise, on Kill Spid withstatusonly ( might be in Rollback state)

this might help (I have used in only twice)
http://grahambrooks.blogspot.com/2007/06/terminate-sql-server-processes-for.html
0
 

Author Comment

by:Srikanthsubramanian
ID: 20364174
I tried lot of times but not able to terminate the processes. This has been resolved after reboot.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
I have a large data set and a SSIS package. How can I load this file in multi threading?
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now