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 tha
t if the stored procedure raises a run-time error, the entire transaction is terminated and rolled back.
Which Transact-SQL statement should you include at the beginning of the stored procedure?
A. SET IMPLICIT_TRANSACTIONS ON
B. SET TRANSACTION ISOLATIO
N LEVEL SNAPSHOT
C. SET IMPLICIT_TRANSACTIONS OFF
D. SET TRANSACTION ISOLATION LEVEL SERIALIZABLE
E. SET XACT_ABORT OFF
F. SET XACT_ABORT ON
Explanation:
When SET XACT_ABORT is ON, if a Transact-SQL statement raises a run-time error, the entire
transaction is terminated and rolled back.
Reference: SET XACT_ABORT (Transact-SQL)
https://msdn.microsoft.com/en-us/library/ms188792.aspx