Inconsistences between DBA(ALL)_TAB_COMMENTS and DBA_TABLES/DBA_OBJECTS (Doc ID 1294034.1)

Last updated on MARCH 01, 2017

Applies to:

Oracle Database - Enterprise Edition - Version 10.2.0.4 and later
Information in this document applies to any platform.

Symptoms


DBA(ALL)_TAB_COMMENTS contains records for a table which does not exist.

E.g.:

SQL> SELECT * FROM dba_tab_comments WHERE table_name ='TEST_TABLE';

OWNER         TABLE_NAME         TABLE_TYPE    COMMENTS
----------    --------------     ------------  ---------------
SYS           TEST_TABLE         TABLE
TEST          TEST_TABLE         TABLE         Test table


Querying DBA_TABLES or DBA_OBJECTS shows that there is only one table having this name:

SQL> SELECT owner, table_name FROM dba_tables WHERE table_name = 'TEST_TABLE';

OWNER           TABLE_NAME
----------      --------------
TEST            TEST_TABLE


Checking for dictionary corruptions using the hcheck script (<Note 136697.1> "hcheck.sql" script to check for known problems in Oracle8i, Oracle9i, Oracle10g and Oracle 11g) does not report any issues.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms