Why does SQL Developer insist that a table does not exist wher it's clear as day that it DOES exist ?
I am trying to run an SQL SELECT which was generated by SQL DEVELOPER by dragging the table name from the object tree into the SQL work area - so
SQL DEVELOPER wrote every single characteter of the SQL statement - and when I run it I get "Table does not exist"
It can't even find it's own table.
That generally means that the user executing the query does not have the needed permissions for the DML being run.
Post the query you are trying to execute and tell us who owns the tables and who is the user executing the query.
The possible reasons for the same could be the permission issue.
You can use this query to get the details(owner, schema etc.) for the given table.
where object_type in ('TABLE','VIEW')
and object_name = 'OBJECT_NAME';
Plus, this error can occur even if you are using an application deployed on the server to access your database, even if you are refer the correct schema. The main point being that how Oracle database distinguishes permissions granted via roles than permissions granted directly.
Check the following queries
Create Table TABLE_A
Create Role READ_ONLY
Grant Select on TABLE_A to READ_ONLY
Grant READ_ONLY to USERXYZ
Grant Select on TABLE_A to USERXYZ
Choose what is apt for you.
Hope it helps!!
I've got an SQL statement of around 100 lines with something like a DOZEN tables in it , and as a diagnostic all poor old Orable can
manage is "Table Does Not Exist" . No line. No Column. No Table Name.
You have not posted any code as previously requested, nor even stated which version of the product you use. The ability to toggle on line numbers in the left gutter of a SQL Worksheet and see the script line and column numbers related to an error in the Query Result / Script Output tab have been available since at least version 1.2.1. In early versions line and/or column numbers referenced in the error message may have been off by 1.
The current production version (3.2.2) and latest early adopter version (4.0 EA2) continue support for those two features. If you do not see it working properly in one or both of these recent versions, please post a reproducible test case if you wish help.
SQL Developer Team