>  기사  >  데이터 베이스  >  SET XACT_ABORT ON

SET XACT_ABORT ON

WBOY
WBOY원래의
2016-06-07 17:42:301925검색

SET XACT_ABORT ON时,在事务中,若出现错误,系统即默认回滚事务, 但只对非自定义错误有效 SET XACT_ABORT OFF,默认值,在事务中,回滚一个语句还是整个事务视错误的严重程序而定,用户级错误一般不会回滚整个事务 Q: you are writing a set of queries a

SET XACT_ABORT ON时,在事务中,香港虚拟主机,若出现错误,系统即默认回滚事务,但只对非自定义错误有效

SET XACT_ABORT OFF,默认值,在事务中,回滚一个语句还是整个事务视错误的严重程序而定,美国空间,用户级错误一般不会回滚整个事务

 

Q:you are writing a set of queries against a filestream-enabled database. you create a stored procedure that will update multiple tables within a transaction.you need to ensure that if the stored procedure raises a run-time error,the entire transaction is terminated and rolled back.which T-SQL statement should you include at the beginning of the stored procedure?

A:SET XACT_ABORT ON

,香港服务器租用
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.