Link to home
Start Free TrialLog in
Avatar of Waqasulhaq
Waqasulhaq

asked on

Find All failed inserts/updates in Oracle Database

Hello all,

I need to find all failed inserts/updates for a certain user in the database.

I was not able to find this infomation using auditing or tracing ( maybe i was doing it wrong).

Thanks for the help..

Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

What are you thinking here?

An insert that 'failed' never made it into the database.  The error would be returned to the calling program.  It is up to that program to track or audit that error.
Avatar of Waqasulhaq

ASKER

We are getting an error in the program (IBM Websphere). But we cannot find the exact insert that fails. Is there a way to find track all failed inserts in the oracle database?
To be honest, I'm not sure.  I'm thinking it would depend on the error/failure.  If the SQL parse is failing, I'm not sure.

You might turn on session tracing but on a high throughput database this can be dangerous.

There are a lot of examples of tracing sessions out there:
http://www.dba-oracle.com/plsql/t_plsql_trace.htm

You might also look at turning on client side tracing in the sqlnet.ora and/or tnsnames.ora files (depending on the Oracle client version).
I think Oracle is able to parse the query, it is just not able to insert because of the error.

I have implemented the tracing in the link you provided. Hopefully that will give me something to work with.

thanks for you help
ASKER CERTIFIED SOLUTION
Avatar of Akenathon
Akenathon
Flag of Uruguay 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
Based on error, we can try few option of failing statement.
ie, In case of dead lock, it will be saved in alert log.
In case of soft lock or blocking locks, ex select ... for update nowait, we can try to get sql.
In case of DDL etc
So what is the error you are getting?
You may want to consider error logging if you are using 10gR2 or later. See this link -
http://www.orafaq.com/node/76
Expert pointed me the right direction.

Thanks