Sunday, February 12, 2012

Begin Trans

If you are set up for AutoCommit why would you or should you set a explicit transaction? I have noticed that in some called stored procudures from a "container" stored procedure. (Hope I got that right) that in the called stored procedure a Begin tran is used. Can anyone help with the why and what fors? It seems to me that you want to let SQL Server handle this becuase of the danger of leaving out a Commit or Rollback? But thats me. I may be very wrong? Thanks.

TomWell...there's a lot of reading you can do in books online...BUT, just as a good general coding practice you should...

I like to follow this template...I'd say most of my sprocs are this way...like 90%

http://weblogs.sqlteam.com/brettk/archive/2004/05/25/1378.aspx

No comments:

Post a Comment