Link to home
Start Free TrialLog in
Avatar of Gary Antonellis
Gary AntonellisFlag for United States of America

asked on

Finding when Rollbacks occur in Oracle

We have an application we suspect is not properly hadnling rollbacks.  The symptom is occasionally (maybe 1 out of 1000 times) a scenario occurs one of the tables gets out of sync such that it appears a transaction is partially committed.

When this occurs our dba cannot find any errors in the Oracle log, but I am not sure we have logging levels at the highest setting.  

When the problem occurs next, we can idenify the approximate time that it occured.  Is there any Oracle tool that can show us if any rollbacks occurred at that time?

Thanks!
Avatar of arnold
arnold
Flag of United States of America image

You've defined the problem, but since I am not an oracle person, not sure whether a non-committed transaction is recorded and even if it is, not sure whether you can track it back given that you may have many transactions started and some committed while other rolled back.


You have to review your code that deals with this table combination and if you don't have it already look at the transactions/process.

You may have depended transactions that are setup independently.
have you tried adding a
begin exception >>log the exeception end
block around the rollback to catch any possible error ?

i came across a nesting of savepoints once which wasn't correct
something like this:
savepoint a;
if x > 1 then 
  savepoint b;
  if Y > 1 then 
    if Z > 1 then 
      rollback to a;
    end if;
    commit b;
  end if;
end if;
commit a;

Open in new window

I think the asker is looking for an oracle DB level tool to discover this.
I suspect at this time, the code where this is an issue is yet to be located/identified.
ASKER CERTIFIED SOLUTION
Avatar of Franck Pachot
Franck Pachot
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gary Antonellis

ASKER

I am trying to collect evidence of production problem that can be given to development group to help them isolate cause of problem.  If I can prove a rollback occured at the time that problem occurred, it will help them isolate the problem

Is Logminer the best tool for examining the redo logs?  Is there any place other than the Redo logs that Rollbacks are logged?