I tested the COMMIT by adding COMMIT TRAN and still had 99 open transactions so I take it the GO 100 must be it and I also have never had any use for that. How would a person then make sure that each row/transaction has been committed? This is the reason why I like QotD so much because I learn things that I have never done or thought of doing before.:-D:-D:-D:-D:-D
In cases where it's not be clear how many commits are needed, you need to do one of two things: (i) fire the developer or dba responsible or (ii) arrange remedial training for the developer/dba responsible.
Of course you also have the option of using
WHILE @@TRANCOUNT>0 COMMIT
instead of a single commit, but I don't reccomend that as a way of avoiding getting the code fixed so that it's always absolutely clear what the pseudo-transaction nesting level is. ("pseudo-transaction" because real nested transactions aren't available in T-SQL since rollback always rolls back the whole nest, not just the current transaction)