• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Techgoeasy

Techgoeasy

Learn Oracle, PHP, HTML,CSS,Perl,UNIX shell scripts

  • Home
  • Oracle
    • Oracle database
    • Oracle Ebusiness Suite
    • Oracle weblogic
    • Oracle Performance Tuning
    • Oracle Hyperion
    • Oracle Cloud Tutorials
  • SQL
  • interview questions
  • Linux
  • PHP and HTML
  • Downloads
  • General
Home » Oracle » Oracle Database » How to Solve ORA-00942 table or view does not exist

How to Solve ORA-00942 table or view does not exist

July 9, 2019 by techgoeasy Leave a Comment

ORA-00942 is one of the many errors which Oracle developer ,Oracle DBA often gets.

Lets first look at the OERR output

ORA-00942 table or view does not exist

Cause: The Oracle table or Oracle view entered does not exist, a synonym that is not allowed here was used, or a view was referenced where a table is required.

Existing user tables and views can be listed by querying the data dictionary. Certain privileges may be required to access the table. If an application returned this message, the table the application tried to access does not exist in the database, or the application does not have access to it.

Action: Check each of the following:

  • the spelling of the table or view name.
  • that a view is not specified where a table is required.
  • that an existing table or view name exists.
  • Contact the database administrator if the table needs to be created or
    if user or application privileges are required to access the table.

Checklist to run for ORA-00942

(1) If you user owns the table or view ,check for spelling mistakes. Query User_objects to check if the table or view exists

select object_name,object_type from user_objects;

(2) If you dont own the table or view, check if you have permission for the table or view. Query all_objects to check if the table or view you are querying is having permission

select * from all_objects where object_type in ('TABLE','VIEW') and object_name = '&1';

If it is not shown here, it means you dont have access to that particular view.You have to get access for the view for the table

GRANT privileges ON object TO user;

Following access can be granted

If the synonym is not created , then you have to use the owner.<table_name>  to access the  table

Desc <owner>.<table_name>

select * from <owner>.<table_name>;

You can create public synonym using the below command

create public synonym exp_table for test.exp_table

(3) ORA-00942 may also occurs while refreshing a Oracle Materialized viewsORA-00942

You  will need to check all the tables in the materialized query to find out the issue. You can use sql trace to find that

Sometimes while creating the table,special character get copied ,So you may get this error. Check the table name in all_tables and then act accordingly.

Related Articles
ORA-00936 missing expression
ORA-00904: invalid identifier
ORA-00257: archiver error. Connect internal only, until freed.
ORA-06512 at line num
Oracle Create table
ORA-00911: invalid character
Oracle documentation

Filed Under: Oracle, Oracle Database, Oracle Sql Tagged With: ORA-00942

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar



Subscribe to our mailing list

Enter your email address to subscribe to this blog and receive notifications of new posts by email

Recent Posts

  • Password Version in oracle
  • How to login as user without changing the password in Oracle database(alter user identified by values)
  • How to check encrypted tablespace in the Database
  • How To Export -Import TDE Master Encryption Key
  • How to Configure Auto Login TDE Wallet

Copyright © 2023 : TechGoEasy

  • Hire me
  • Privacy Policy
  • Contact Us
  • New? Start Here
  • About Us