Exception Handling in Yukon Transactions
Ok, it is Friday, so an easy one to digest, but quite powerful. Yukon has made a major improvement in Error Handling inside of TSQL transactions. You can now catch Transaction Abort Errors using the TRY / CATCH model without any loss of the transaction context. This makes me very happy. The syntax is here:
BEGIN TRY
sql statement
END TRY
BEGIN CATCH TRAN_ABORT
END CATCH
See my article on SQLJunkies.com.
Page rendered at Friday, March 31, 2023 11:19:43 AM (Eastern Standard Time, UTC-05:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.