5

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?

2
  • 2
    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. Feb 18, 2013 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, 2013 at 14:05

1 Answer 1

4

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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