OK I checked the FAQ section first this time (sorry for last time) and I didn't see anything on this.
I have a stored procedure that has a few transactions. At the beginning of the transaction we add a record to a history table and at the end if no rollbacks we update the record.
This works well most of the time, we have a quick log of how often the stored procedure is run and how often the stored procedure runs successfully.
However, it appears that sometimes there is a larger transaction that rolls back the entire stored procedure and pulls out the record in our history table.
Is there a way to define a section of code as running "outside of all transactions" so it won't be rolled back? I guess I could write to a log file, but I am hoping to have the data in a table.
thaks again for all your help,
Brit
I have a stored procedure that has a few transactions. At the beginning of the transaction we add a record to a history table and at the end if no rollbacks we update the record.
This works well most of the time, we have a quick log of how often the stored procedure is run and how often the stored procedure runs successfully.
However, it appears that sometimes there is a larger transaction that rolls back the entire stored procedure and pulls out the record in our history table.
Is there a way to define a section of code as running "outside of all transactions" so it won't be rolled back? I guess I could write to a log file, but I am hoping to have the data in a table.
thaks again for all your help,
Brit