Why or when would you set SET XACT_ABORT to OFF?

Viewed 84

I know what XACT_ABORT is. There is a lot of info on why to set this to on. My question is why would someone set it to off? The point of a transaction is either everything is done or nothing is done. So why would someone set this to off? Why MS even choose off as the default is strange (The default for triggers is on and I know that).

1 Answers

After some digging I can only think of one decent reason as to why you would. That would be that you would want the transaction to continue processing regardless of any errors that are flagged. It might be that you want to deal with the errors later on rather than having the entire transaction rolled back.

There are also certain times when having XACT_ABORT isn't required for data modification statements but requirement is different to preference.

Source: MSDN

Related