Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We just ran into a problem, where a server process running a select was blocking our entire public website. What we ended up doing was killing the server process.

My question is: Is it considered safe to kill of a server process as long as the process is only running a SELECT statement? Or could there be some side-effects to this I haven't considered?

share|improve this question
When you say "server process" are you talking about an internal SQL Server system spid? If so what was the nature of the blocking? Also bear in mind a transaction can contain multiple statements so a process that appears to be just doing a SELECT now may have some humongous transaction to rollback. – Martin Smith Feb 18 '13 at 13:13
We just found out that a developer was trying to debug a SELECT-statement that was causing some troubles. By accident he forgot about the running statement. So in this case it was safe, because we were sure no transaction was involved. – Falle1234 Feb 18 '13 at 14:05
up vote 4 down vote accepted

Ultimately it will depend on whether your website is coded to handle this happening. I have seen blocking occur when a select statement is issued within the context of a transaction which then locks a considerable amount of rows until the transaction is complete. If your website is in the middle of placing an order or billing somebody's credit card and you kill it bad things could happen if the website is not coded to handle it properly. To be sure consult the developers of the website - they would be your best resource in understanding how it will cope in situations like this.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.