Improve company productivity with a Business Account.Sign Up

x
?
Solved

Finding when Rollbacks occur in Oracle

Posted on 2013-11-04
6
Medium Priority
?
456 Views
Last Modified: 2013-11-05
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!
0
Comment
Question by:Gary Antonellis
5 Comments
 
LVL 82

Expert Comment

by:arnold
ID: 39623382
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.
0
 
LVL 39

Expert Comment

by:Geert G
ID: 39623538
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

0
 
LVL 82

Expert Comment

by:arnold
ID: 39624024
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.
0
 
LVL 15

Accepted Solution

by:
Franck Pachot earned 1500 total points
ID: 39624171
Hi,
You can have statistics such as the number of rommits/rollbacks in a session.
But if you need more information, only logminer can help. It is an Oracle tool to read the redo logs and they have information about each updates and each commit/rollback.
Regards,
Franck.
0
 

Author Closing Comment

by:Gary Antonellis
ID: 39624365
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?
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

605 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question