Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Atomic Transaction in SQL Server

Status
Not open for further replies.

omninews

Programmer
May 8, 2003
10
0
0
US
Hi,
I am using SQL2000. I have existing Stored Procedures that need to log the run-time errors by checking @@Error using one InsertError SP. The SP InsertError curretly stores the Error message into the server's EventViewer. I would like to change it to store the error message to an Error table in the database.
However, the stored procedures that call the InsertError SP might have transaction wrapped. Once there is an error, the caller would Roll Back the transaction right after logging the Error (calling InsertError). If I change the InsertError to insert to table , then the roll back would roll back the insertion to the Error table too.
Is there any way that like in Oracle "Atomit Transaction" , that without touch the callers code, I can let the InsertError commited but the rest of the transaction rolled back?

Thanks!
OmniNews
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top