ORA-00942: table or view does not exist
Thank you Oracle for that most informative message. Hey Larry, would you mind telling me
Sheesh! 1 little printf on their part would have saved ME PERSONALLY many man years of debugging. How frustrating to find this in a log of an appserver connected to a database with thousands of tables and views. And of course it prints this same useless message if the table DOES exist but the user doesn't have permission to read it.
[quote user="johnharlow"]And of course it prints this same useless message if the table DOES exist but the user doesn't have permission to read it.[/quote]
MSSQL provides the same message when a user has insufficient permission.
I do not know if that is because:
A) only permitted objects are loaded for a user, so that querying as a certain user really does exlude the unpermitted object, making the error completely logical, natural and understandable;
B) the different types of error are simply merged into one to provide Security By Obscurity, so that any hacker getting the message does not know if the object actually exists, or that he just doesn't have permission -- in which case he knows it's a valid name, and can proceed towards attempting to gain those permissions.
It's a very useful message.
Except for not mentioning the object name.
The reason is security, although it's not really "Security By Obscurity". Nothing is being obfuscated or obscured. You should never reveal the information that a table (or more accurately, any database object) even exists unless the security criteria for accessing that object are met. The rest of the previous poster's comments are right on.
If one is a hacker trying to get access to some data, do you think he/she will stop looking for the table just because he/she got an error message - table not found. He/She would try to assume DBA Operator id and then find it out for himself/herself rather than depend on a canned message.