Why isn't SET XACT_ABORT ON the default behavior?

前端 未结 1 345
时光说笑
时光说笑 2020-12-10 01:49

Reading things like this post on Dan Guzman\'s blog, I wonder: why isn\'t SET XACT_ABORT ON the default behavior? Is there a case where it\'s harmful, or mu

相关标签:
1条回答
  • 2020-12-10 01:51

    It's an automatic response to an error, it's more desirable if you can handle the error and recover from it. If the transaction automatically rolls back then you don't get this opportunity.

    The problem Dan mentions in his blog arises because of the abort from the client, within SQL this abort doesn't exist. Hence within SQL the default is not to automatically abort transactions.

    0 讨论(0)
提交回复
热议问题