Hi John,
Appreciate real quick responses to my thread. Outstanding!!!
I am working on granting additional access. Also, I tried to run the SQL in part. ie. before UNION ALL and after. I found that the query before UNION ALL runs fast but the one after runs very slow. So, problem is with the second part of the query
Select distinct o.owner, s.name, 'PACKAGE BODY', 'V', null, null, null, null, null
from sys.ALL_SOURCE s, sys.all_objects o
where s.type = 'PACKAGE BODY'
and s.owner = :own
and o.owner = s.owner
and o.object_name = s.name
and o.object_type = 'PACKAGE'
and not exists (select 'x'
from sys.all_objects o_sub
where o_sub.owner = s.owner
and o_sub.object_name = s.name
and o_sub.object_type = 'PACKAGE BODY')
order by 3
- Sam