No of visitors who read this post: 793
Category: Oracle Database
Type: Question
Author: Mark_fassy
No votes yet

Hi,

When i am using TOAD to administer our oracle database,

I meet an error that tells me ORA-00942: table or view does not exist.

ORA-00942: table or view does not exist

ORA-00942: table or view does not exist

I came across this error every time I am compiling an object, package, view in oracle, and sometimes when I execute PL/SQL statement on Oracle table. It also happens when I run an application, specifically oracle program.

I already scanned some books and did some browsing over the internet, but I have a hard time looking at the solution to my problem. It took a lot of my time looking for the solution, please share some ideas and points to my issue.

Thanks.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

# (Solution Accepted)

Hi Mark,
 
Whenever there is an error while compiling any object, then the issue is related to access whether you have privilege to access it or not.
 
  1. Database table does not exist means you are not permitted. Grant privilege on object to user;grant select, insert, update and delete on package to user; these are syntax for grants.
  2. Object itself is invalid. You have to identify invalid object and rectify it by compiling with some techniques.
  3. We can check invalid objects by using select object_name object_types from user_objects where status = "invalid". Compiling can be done in following ways:
  4. ALTER PACKAGE my_package COMPILE;
 
So on compiling with body,
 
  • my_function,
  • my_trigger,
  • my_view (just replacing with these in place of my_package).
 
These are the procedures to find invalid objects and compiling and.
 
NOTE: basically its better to recompile those invalid objects in repository itself.

# (Solution Accepted)

Hi Mark,
 
I think that your tables are not being accessed onto other schemas. This problem emerges even when the tables have proper access rights. There can be two solutions:
 
Either you prefix your Table name with schema name
e. g. <schema_name>.<table_name>
 
2. Or what I can really suggest is to make 'Public' synonyms for the tables. I believe that this will solve your problem.
 
Thanks,
 
Kamal.