sql server - Purpose of nested transactions -


i have never understood nested transaction for. committing nested transaction commits nothing - decreases @@trancount. , rollback rollbacks everything.

begin transaction    //do update    begin transaction      //do insert    commit transaction commit transaction 

what difference this:

begin transaction      //do update      //do insert commit transaction 

please give me example why should nested transactions used , how make difference.

regards, petar

nested transactions allows code call other code (sps instance) uses transactions without committing your transaction when they commit.

that said, can use safepoints roll inside of transaction.

there's codeproject article dedicated that.


Comments

Popular posts from this blog

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -