Solved

How to terminate a processes in MS SQL Server

Posted on 2007-11-27
10
1,140 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +2
10 Comments
 
LVL 50

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 50

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
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.

 

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
 
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

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

726 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