List objects that use specific object in Oracle database

Article for: SQL Server Azure SQL Database

Query below lists all objects that are referencing to specific object .

Query

select owner || '.' || name as referencing_object,
       type as referencing_type,
       referenced_owner || '.' || referenced_name as referenced_object,
       referenced_type
from sys.all_dependencies
where referenced_name = 'object_name'  -- put your object name here
      --and referenced_owner = 'schema name'
order by referencing_object;

Note. If there is more objects with the same name uncomment referenced_owner clause

Columns

  • referencing_object - provided object name with schema name
  • referencing_type - type of provided object
  • referenced_object - name and schema of the referenced object
  • referenced_type - type of referenced object

Rows

  • One row represents one depending object
  • Scope of rows: all objects that are depending on specified object
  • Ordered by referencing object schema name and name

Sample results