|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
MTS QueryThis is a silly question 1. What the precausions we need to take care while coding a procedure, if we have an MTS. Do we need to explicitly mention the Transactions in the sps ? And what about setting the Value of 'XACT_ABORT' . 2. Another situation in the same. Normally all our master tables will have a curresponding Audit table. and what we do usually in case we dont have a transaction server is given below SET XACT_ABORT ON step 1. Insert into master table step 2. Insert into Audit table step 3. Begin Trans ............ ............. ............. If @@ERROR<> 0 rollback trans step 4. Commit Trans Now how can i do the same in case we have a transaction server. thanks and regards Lara AFAIK, the behaviour might be the same. forget about new lines or any stuff
Show quote "lara169" wrote: > Hi, > This is a silly question > > 1. What the precausions we need to take care while coding a procedure, if we > have an MTS. Do we need to explicitly mention the Transactions in the sps ? > And what about setting the Value of 'XACT_ABORT' . > > 2. Another situation in the same. > Normally all our master tables will have a curresponding Audit table. and > what we do usually in case we dont have a transaction server is given below > > SET XACT_ABORT ON > step 1. Insert into master table > step 2. Insert into Audit table > step 3. Begin Trans > ............ > ............. > ............. > If @@ERROR<> 0 > rollback trans > step 4. Commit Trans > > > > Now how can i do the same in case we have a transaction server. > > thanks and regards > Lara > > > |
|||||||||||||||||||||||