Why doesn't Oracle tell you WHICH table or view does not exist?

前端 未结 8 1159
时光取名叫无心
时光取名叫无心 2021-01-31 13:43

If you\'ve used Oracle, you\'ve probably gotten the helpful message \"ORA-00942: Table or view does not exist\". Is there a legitimate technical reason the message doesn\'t incl

相关标签:
8条回答
  • 2021-01-31 14:28

    Reason 1: Multi-lingual interface

    There is a language-specific message configuration file for your database instance. Messages are pulled out of there and translated from the pure numeric version to the numeric+text version.

    It was probably considered better to have the hardcoded strings, than to run the risk at runtime of having a mysterious failure due to an improperly formatted "%s" string.

    (Not that I particularly agree with this POV, btw.)

    Reason 2: Security

    Right now you don't particularly expose the internal workings of your application if you print a PHP, etc, dump of an Oracle error message to the browser.

    Applications would be a bit more exposed if more detail were printed by default... For example, if citibank printed a more explanatory message.

    (see disclaimer above, I would be happy to get more information in the error as well.)

    0 讨论(0)
  • 2021-01-31 14:32

    If you are using a SQL browsing tool like TOAD or TORA it will help you with ORA errors by highlightling or pointing moving the cursor to where you made your error.

    Copy and paste your SQL in to one of these tools to help. You may also find the analyse info available useful too.

    0 讨论(0)
提交回复
热议问题