Trying to work with Auditing and found one weird behaviour (to my mind)
I created audit area, turned autiding on, added rules - seems to me everything is ok, all messages are recording, no issues.
BUT! when I added audit ABL statement (like AUDIT-CONTROL:LOG-AUDIT-EVENT(32001, "Updated 10001 records from table Customers")) inside of the transaction,
I found that if something happens my audit data gets rolled back with the transaction. I expected to see something like "Autonomous Transactions" in Oracle, which are saving even if a transaction was rolled back.
Is there any key or any statement to allow to store my Audit data even if a transaction was rolled back?
P.S. We are using OpenEdge 10.1C04
Audit records just like db table records are rolled back within transanction. It is common rule.
If you want to change it - open new thread, for example, by using appserver broker.
Actually i always thought that audit roll back is good idea. If nothing changed in my db why should I keep records about changing something?
Actually i always thought that audit roll back is good idea
For events like CREATE/UPDATE/DELETE an so on I would agree. But for custom events I want to see why transaction rolled back, what my Application did 5 sec before that...
I thought that the main reason why we have custom events and ABL statements like AUDIT-CONTROL:LOG-AUDIT-EVENT is to have an option to log our own messages that can help us to trace faults as well as success in our programs.
Use log-manager for fault tracing.