Commit c8b8381b authored by dwentzel's avatar dwentzel

changes

parent f688d87c
SET NOCOUNT ON
/*
According to BOL (http://msdn.microsoft.com/en-us/library/ms188929.aspx) named transactions
must adhere to the rules for identifiers, except names will be truncated at 32 characters.
......
SET NOCOUNT ON
/*
According to BOL (http://msdn.microsoft.com/en-us/library/ms188929.aspx) named transactions
must adhere to the rules for identifiers, except names will be truncated at 32 characters.
......
SET NOCOUNT ON
/*
In this example SQL Server will help you if you mismatch your BEGIN and COMMIT TRAN statements.
......@@ -7,8 +8,8 @@
But this behavior does not work when using implicit transactions
Demo:
1)EXEC Wrapper 1 with implicit_transactions OFF...note that Error 266 is thrown
2)EXEC Wrapper 0 with implicit_transactions OFF...note that Error 266 is thrown
1)EXEC Wrapper 1 with implicit_transactions OFF...note that Error 266 is thrown, transaction "dangled"
2)EXEC Wrapper 0 with implicit_transactions OFF...note that Error 266 is thrown, transaction rolled back
3)EXEC Wrapper 0 with implicit_transactions ON...Error 3902 occurs in Wrapper Procedure
3)EXEC Wrapper 1 with implicit_transactions ON...in this case no error is thrown and we "dangled" a transaction
......
......@@ -9,7 +9,7 @@
Demo:
1)Error: "BatchProcessing cannot be called in the context of an open transaction"
2)Even with SET IMPLICIT_TRANSACTIONS ON everything works correctly. (Line 63-64)
2)Even with SET IMPLICIT_TRANSACTIONS ON everything works correctly. (Line 70)
3)But does not function correctly without the wrapper (Line 70-71). Note that we have 2
transactions.
......
SET NOCOUNT ON
/*
This further demos how to check if you are running under
implicit transactions (IT) and some of the consequences
......
Transaction Trivia
======================
Did you ever notice that sp_reset_connection is called A LOT?
Did you ever see an "orphaned spid" with an open transaction that caused you massive blocking?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment