Capture SQL that is causing an error
118236Dec 4 2008 — edited Dec 8 2008We have this application that I can no longer see the source code. (it is being presently redeveloped). I have encountered a particular situation where a user of the app receives an Oracle error reporting "more than 2 rows have been returned" and the app will not proceed.
What I need to do is see what SQL the application is sending to Oracle that generates this error. I know the error has to do with the data in our database as this error only occurs with specific records being entered, I just need to know where to look.
I have used v$sql, but it only records the statements right prior to the one that I am interested in.
Is there a way to find out what the application is sending to Oracle successfully or unsuccesfully?
We are running Oracle 9.2 on Intel.
Thanks