0

I have noticed something over the last few months. Each time we run a script that has a transaction statements let say we stop the query unexpectedly this action actually lock the database.

The only way out is to destroy the transaction each time. I have never experience this before even though I have stopped the query in the middle of transaction in the past and it has never locked the database.

Could it be that we are missing something in settings or I should not stop transaction queries unexpectedly?

The problem occurred with SQL SERVER 2005. please I need your brain. Thanks Guys

Terry
  • 103
  • 8

1 Answers1

4

This is usual: you have sent a client abort which say "stop processing"

To rollback and release lock, you need to use SET XACT_ABORT ON

SO 1 and SO 2

Community
  • 1
  • 1
gbn
  • 422,506
  • 82
  • 585
  • 676