Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Dexter.

Asked: February 21, 2024 - 2:48 pm UTC

Last updated: February 26, 2024 - 5:04 am UTC

Version: 19.4

Viewed 100+ times

You Asked

As part of a migration effort, I'm researching dependencies and am confused by the different results displayed by SQL Developer's Dependencies tab versus running something like the following:
SELECT * FROM user_dependencies WHERE name = 'USP_COMPANYIMPORT';


The former displays 19 rows, whereas the latter displays only 15 rows, including two where the REFERENCED_OWNER is SYS.

Q1: Why the difference?
Q2: Is it possible to view the code SQL Developer runs to obtain its results?

Thank you.

and Connor said...

SQL Developer runs the following

If you are a DBA

select owner, name, type, referenced_owner, referenced_name, referenced_type ,referenced_owner sdev_link_owner, referenced_name sdev_link_name, referenced_type sdev_link_type
from Dba_DEPENDENCIES
where owner = :OBJECT_OWNER
and name = :OBJECT_NAME

If you are not

select owner, name, type, referenced_owner, referenced_name, referenced_type ,referenced_owner sdev_link_owner, referenced_name sdev_link_name, referenced_type sdev_link_type
from ALL_DEPENDENCIES
where owner = :OBJECT_OWNER
and name = :OBJECT_NAME

so probably the latter is where you want to be looking