Summary
When for example rename a table or add a new column to the table the objects (procedures, packages, triggers etc) what references the table get
invalid. To find which objects have a reference to table HELPDESK.S_RECIPIENTS execute:
SELECT D.owner, NAME, TYPE, O.LAST_DDL_TIME, O.status, DEPENDENCY_TYPE
FROM all_dependencies D, dba_objects O
WHERE O.OBJECT_NAME = D.NAME
AND O.OWNER = D.OWNER
AND referenced_owner = 'HELPDESK'
AND referenced_name = 'S_RECIPIENTS';
All dependencies are in the view:
ALL_DEPENDENCIES
Column Description
------ -----------
OWNER Owner of the object
NAME Name of the object
TYPE Type of object
REFERENCED_OWNER Owner of the parent object
REFERENCED_NAME Type of parent object
REFERENCED_TYPE Type of referenced object
REFERENCED_LINK_NAME Name of the link to the parent object (if remote)
SCHEMAID ID of the current schema
DEPENDENCY_TYPE Whether the dependency is a REF dependency (REF) or not (HARD)
Another query
SELECT dep.tree||obj.owner owner, obj.object_name, obj.object_type, obj.status, obj.LAST_DDL_TIME
FROM DBA_OBJECTS obj,
(SELECT dep.object_id, RPAD('*',3*LEVEL,'*') tree
FROM PUBLIC_DEPENDENCY dep,
(SELECT object_id
FROM DBA_OBJECTS
WHERE owner = 'HELPDESK'
AND object_name = 'S_RECIPIENTS'
AND object_type = 'TABLE') obj
CONNECT BY PRIOR dep.object_id = dep.referenced_object_id
START WITH dep.referenced_object_id = obj.object_id
ORDER SIBLINGS BY dep.object_id DESC) dep
WHERE dep.object_id = obj.object_id;