SET XACT_ABORT ON
2016-01-04 11:53
127 查看
Syntax
SET
XACT_ABORT { ON | OFF}
When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire transaction is terminated and rolled back.
When SET XACT_ABORT is OFF, in some cases only the Transact-SQL statement that raised the error is rolled back and the transaction continues processing. Depending upon the severity of the error, the entire transaction may be rolled back even when SET XACT_ABORT
is OFF. OFF is the default setting.
Compile errors, such as syntax errors, are not affected by SET XACT_ABORT.
XACT_ABORT must be set ON for data modification statements in an implicit or explicit transaction against most OLE DB providers, including SQL Server. The only case where this option is not required is if the provider supports nested transactions.
When ANSI_WARNINGS=OFF, permissions violations cause transactions to abort.
The setting of SET XACT_ABORT is set at execute or run time and not at parse time.
目前理解:
set
xact_abort on, 事务失败all将rollback,
set
xact_abort off,事务失败只有失败的才会rollback.
SET
XACT_ABORT { ON | OFF}
Remarks
When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire transaction is terminated and rolled back.
When SET XACT_ABORT is OFF, in some cases only the Transact-SQL statement that raised the error is rolled back and the transaction continues processing. Depending upon the severity of the error, the entire transaction may be rolled back even when SET XACT_ABORT
is OFF. OFF is the default setting.
Compile errors, such as syntax errors, are not affected by SET XACT_ABORT.
XACT_ABORT must be set ON for data modification statements in an implicit or explicit transaction against most OLE DB providers, including SQL Server. The only case where this option is not required is if the provider supports nested transactions.
When ANSI_WARNINGS=OFF, permissions violations cause transactions to abort.
The setting of SET XACT_ABORT is set at execute or run time and not at parse time.
目前理解:
set
xact_abort on, 事务失败all将rollback,
set
xact_abort off,事务失败只有失败的才会rollback.
相关文章推荐
- 禁止访问者查看网页源代码
- Memcached 之 .NET(C#)实例分析
- server.xml
- Mongodb 数据类型及Mongoose常用CURD
- JMeter专题系列(六)集合点
- 如何实现实时监控数据库主从同步的状态
- memcache安装64位系统
- 汇编指令速查
- $.ajax()方法详解
- 转jQuery获取和操作元素的属性和CSS样式
- p7 struct and union
- java.lang.VerifyError解决方案
- Android编程使用内容提供者方式(ContentProvider)进行存储的方法
- 计算几何的相关知识
- hdu2553 N皇后问题【二进制状态压缩基础】
- 标签TextView
- 世界摄影大赛获奖精品!令人惊叹!
- Meteor 拦截回车键 回车搜索 及其他键盘事件
- Unable to load class 'org.codehaus.groovy.runtime.typehandling.ShortTypeHandling'
- 人工生命