Invalid Object Queries


column comp_name format a40
column version format a12
select comp_name,version,status from dba_registry;

column owner format a15
column object_name format a40
column object_type format a20
select owner, object_name, object_type from dba_objects where status='INVALID' order by owner,object_name;

set linesize 260
column owner format a12
column name format a30
column position format a10
column text format a150
SELECT e.owner, e.name, TO_CHAR(e.line) || '/' || TO_CHAR(e.position) "POSITION", e.text
FROM dba_errors e
ORDER BY e.owner, e.name, e.sequence;

Duplicate invalid types
========================
select object_id, owner, object_name, object_type, status from dba_objects where object_name in (select distinct object_name from dba_objects where object_type='TYPE' and status='INVALID') order by owner, object_name;

SR 7227690.992
I am helping out Walter with some of his calls. The 16 invalid objects in the SYS schema are all stale types. Types work a little different than other objects in that you can have multiple types by the same name in the same schema. It's not really multiple types, but rather multiple versions of the same type. As long as there is one of each name that is valid, then you can ignore the invalid ones by the same name. They are referred to as "stale" types. There is an open bug (bug 6599034) which lists the same invalid types that you have. There is a comment from development in the bug which states it is OK to ignore the stale types. They do not cause any problems. Furthermore, it is extremely difficult to get rid of them.

SYS AQ$_DESCRIPTOR TYPE INVALID
SYS AQ$_EVENT_MESSAGE TYPE INVALID
SYS AQ$_REG_INFO TYPE INVALID
SYS AQ$_REG_INFO_LIST TYPE INVALID
SYS AQ$_SRVNTFN_MESSAGE TYPE INVALID
SYS DBMS_XPLAN_TYPE TYPE INVALID
SYS DBMS_XPLAN_TYPE_TABLE TYPE INVALID
SYS LCR$_ROW_LIST TYPE INVALID
SYS LCR$_ROW_UNIT TYPE INVALID
SYS MSG_PROP_T TYPE INVALID
SYS XMLGENFORMATTYPE TYPE INVALID