Microsoft
Software
Hardware
Network
Question : Multiple Stored Procedures in a single transaction
Hi,
I need to execute multiple stored procedures in a oracle transaction.
begin
Execute Stored Procedure1
Execute Stored Procedure1
Execute Stored Procedure1
Commit;
Exception
when others then
rollback;
insert error into error log table.
I have error handling in all stored procedures. When a sp failed,
I insert error into error log, then use RAISE to comeback to main procedure(above).
My insert error log statemetn in stored procedure1 fails because I have Rollback in this main procedure, but inserts error from the insert
statement above. I loose error information from other stored procedure.
Basically, I need to make sure all procedures ran successfully or rollback everything. But, need to capture errors from within each stored procedure.
Please help.
CK
Answer : Multiple Stored Procedures in a single transaction
you might want to create a small helper function that runs a autonomeous transaction to save the error log, using
PRAGMA AUTONOMOUS_TRANSACTION;
http://stanford.edu/dept/i
tss/docs/o
racle/10g/
appdev.101
/
b10807/13
_elems002.
htm
Random Solutions
delay notifications from AOL and GT.RR.COM, exchange 2003
Debian 5 Lenny cannot connect via SSH with alternate user
How can I add a total cost for each row that has at least one dynamic checkbox checked?
How do I get inherited properties from a derived interface using Reflection ?
Microsoft Hyper-V Server 2008 R2 - Is there a benefit to a small organisation?
Public IP
IE & Firefox not working on VM Workstation
Outlook 2007 keeps bombing every five minutes or so. Send error report?
word/excel don't show any printers on terminal server, but outlook/notepad/IE/etc work perfectly
Jquery javascript error