Tuesday, 21 May 2013

Getting ORA-00942: table or view does not exist error when accessing meta data views in oracle

When you try to access any meta data views like DBA_OBJECTS, DBA_TABLES, DBA_VIEWS etc.. (starts with DBA_) some time you may get an error like below:

SQL> select object_name,status from dba_objects where object_name in ('VIEW_T1');
select object_name,status from dba_objects where object_name in ('VIEW_T1')
                               *
ERROR at line 1:
ORA-00942: table or view does not exist

Reason is user does not have DBA privileges to access them. So login into system schema grant DBA permissions to respected schema.

SQL> GRANT DBA TO SCOTT;