ORA-00942: table or view does not exist

Asked By 980 points N/A Posted on -
qa-featured

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.

SHARE
Best Answer by phani
Best Answer
Best Answer
Answered By 0 points N/A #122434

ORA-00942: table or view does not exist

qa-featured

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.
Answered By 0 points N/A #122436

ORA-00942: table or view does not exist

qa-featured

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.

Login/Register to Answer

Related Questions