Toad World® Forums

Tab "Used By" for a table causes "ORA-00942"

#1

The current beta version (13.2.0.129) uses the following query:

with Deps as
  (Select object_id, referenced_object_id, level as lvl, rownum Deps_rownum
   from   (select object_id, referenced_object_id
           from public_dependency
           where referenced_object_id <> object_id) pd
   connect by nocycle prior object_id = referenced_object_id
   start with referenced_object_id = :objID)
Select o.owner, o.object_type, o.object_name, o.object_id, o.status, Deps.lvl, Deps.referenced_object_id parent_id
from   sys.DBA_OBJECTS o, Deps
where  o.Object_id = Deps.Object_id
order by Deps_rownum;

while version 13.1.0.78 uses the following query:

with Objs as
  (Select object_id
   from   (select object_id, referenced_object_id
           from public_dependency
           where referenced_object_id <> object_id) pd
   connect by nocycle prior object_id = referenced_object_id
   start with referenced_object_id = :ObjID)
Select o.owner, o.object_type, o.object_name, o.object_id, o.status
from   sys.ALL_OBJECTS o, Objs
where  o.Object_id = Objs.Object_id;

Of course, as a "normal" schema user I have no access to DBA_OBJECTS.

#2

Thanks Dirk, it is fixed for next beta.