Take the 2-minute tour ×
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. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.