How to locate the object you are unknown

zhaozj2021-02-12  139

I saw some people asked how to find a view, or a table was quoted by those objects, I didn't pay attention, I didn't pay attention, today's friend asked. I think there is VIEW to express this dependency, so I even Open DBA Studio, enter the plan - view --- SYS, then quickly browse DBA_ * such a View .

SQL> DBA_DEPENDENCIESNAME NULL? TYPE ----------------------------------------- ------ ---------------------------- Owner NOT NULL VARCHAR2 (30) Name Not Null Varchar2 (30) Type Varchar2 (17) REFERENCED_OWNER VARCHAR2 (30) REFERENCED_NAME VARCHAR2 (64) REFERENCED_TYPE VARCHAR2 (17) REFERENCED_LINK_NAME VARCHAR2 (128) DEPENDENCY_TYPE VARCHAR2 (4) select u.name, o.name, decode (o.type #, 0, 'NEXT OBJECT' , 1, ', 3,' Cluster ', 4,' View ', 5,' Synym ', 6,' Sequence ', 7,' Procedure ', 8,' Function ', 9 , 'Package', 10, 'Non-EXISTENT', 11, 'Package Body', 12, 'Trigger', 13, 'Type', 14, 'Type Body', 28, 'Java Source', 29, 'Java Class', 56, 'Java Data', 'Undefined'), Decode (Po.LinkName, Null, Pu.Name, Po.remoteowner), Po.Name, Decode (Po.Type #, 0, 'Next Object', 1, 'INDEX', 2, 'TABLE', 3, 'Cluster', 4, 'View', 5, 'Synynym', 6, 'Sequence', 7, 'Procedure', 8, 'Function', 9, 'Package', 10, 'Non-Existent', 11, 'Package Body', 12, 'Trigger', 13, 'Type', 14, 'Type Body', 28, 'Java Source', 29, 'Java Class ', 56, 'Java Data', 'undefined'), PO.LinkName, Decode (D.Property, 2, 'Ref', 'hard') from sys.obj $ o, sys.disk_and_fixed_objects po, sys.dependency $ d, sys. User $ u, sys.user $ puwhere o.obj # = d.d_obj # and o.owner # = u.use # and Po.obj # = d.p_obj # and pointner # = pu.user # here Basically, 99% confirmation is, then tested, it is really this View records the relevant dependencies.

转载请注明原文地址:https://www.9cbs.com/read-7224.html

New Post(0)