If you have used Oracle, you've most likely become the useful message "ORA-00942: Table or view doesn't exist". It is possible to legitimate technical reason the content does not range from the title from the missing object?

Arguments relating to this being because of security seem like these were crafted through the TSA. If I am an assailant, I'd understand what table I simply tried to exploit, and have the ability to interpret this unhelpful message easily. If I am a developer using a complex join through several layers of application code, it's frequently tough to tell.

My prediction is the fact that if this error was initially implemented, someone forgot to add the item title, and today, individuals are afraid it'll break compatibility to repair it. (Code doing silly such things as parsing the mistake message is going to be confused whether it changes.)

It is possible to developer-friendly (instead of prospecting your DBA) way to look for the title from the missing table?


Although I have recognized a solution that is highly relevant to the subject, it does not really answer my question: Why is not the title area of the error message? If anybody can develop the actual answer, I'm going to be pleased to change my election.

SQL*Plus does let you know the table that does not exist. For instance:

SQL> choose

  2     *

  3  from

  4     user_tables a,

  5     non_existent_table b

  6  where

  7     a.table_title = b.table_title

   non_existent_table b

   *

ERROR at line 5:

ORA-00942: table or view doesn't exist

Here it implies that the title from the missing table and also the line number within the SQL statement in which the error happens.

Similarly, inside a one-line SQL statement you can observe the asterisk highlighting the title from the unknown table:

SQL> choose * from user_tables a, non_existent_table b in which a.desk_title = b.table_title

choose * from user_tables a, non_existent_table b in which a.desktitle = b.table_title

                             *

ERROR at line 1:

ORA-00942: table or view doesn't exist

When it comes to your question, I suppose the main reason the mistake message does not range from the title on the table would be that the error message itself must be static text. The road number and placement within the type of the mistake is clearly passed to SQL*Plus (in some way).

You are able to set a celebration inside your parameter file (plain text or spfile) to pressure Oracle to dump an in depth trace file within the user_dump_dest, the item title may be inside, otherwise the SQL ought to be.

EVENT="942 trace title errorstack level 12"

If you work with an ordinary text file you have to keep all of your EVENT configurations on consecutive lines. Unsure how that put on spfile.

If you work with a SQL browsing tool like TOAD or TORA it can help you with ORA errors by highlightling or pointing moving the cursor to in which you made your error.

Copy your SQL directly into one of these simple tools to assist. You may even discover the analyse info available helpful too.

If it is not really a huge statement, then your simplest strategy is just to determine the data dictionary,

SQL> choose * from xx,abc

choose * from xx,abc

                 *

ERROR at line 1:

ORA-00942: table or view doesn't exist

SQL> choose owner,table_title allfurniture where table_title in ('XX','ABC')

OWNER                          TABLE_Title

------------------------------ ------------------------------

MWATSON                        XX

SQL>

This is not ideal, but lacking going and analyzing trace files, I am unsure how else to get it done.

@Matthew

Your query's a start, but may possibly not work if you have multiple schemas. For instance, basically log into our instance as myself, I've read use of all of our tables. But when I do not qualify the table title using the schema I'll have an ORA-00942 for tables without synonyms:


SQL> choose * from tools

choose * from tools

              *

ERROR at line 1:

ORA-00942: table or view doesn't exist

The table still turns up in most_tables though:


SQL> choose owner, table_title allfurniture where table_title = 'TOOLS'

OWNER                          TABLE_Title

------------------------------ ------------------------------

APPLICATION                    TOOLS

@erikson Sorry that does not help much. I am with Mark - I made use of TOAD.