ORA-00942: table or view does not exist

oracle

I have application / service which connects to Oracle database (11g) which shows me "ORA-00942: table or view does not exist" in its log file without any indication of particular table/view with which it has problem. And there is no way on app side to increase log details to include this data.

I have direct access to the Oracle database which is using by this app (not DBA level privileges, but quite high level of access) any advice on how to check with which table or view my app having issue? Probably I can use some query to check this? I'd like to find out object name so that I can check granted access and any locks on it.

Best Answer

If you enable tracing for this specific error, a session trace file will be generated whenever it occurs. This will allow you to view the SQL that causes the error. You will probably need the cooperation of your DBA to do this, as it's likely only they will be able to activate the trace and access the trace dump directory.

Here's a link showing how to do this:

http://oracle.erkansaka.org/2011/09/how-to-trace-oracle-error.html

So for you that would be:

alter system set events '942 trace name errorstack level 1';