RE: determine tables in view (9iR2)

  • From: cosmin ioan <cosmini@xxxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Fri, 9 Feb 2007 14:16:50 -0800 (PST)

thanks all  !    thanks Tim!
   
  dba_dependencies and of course, the plan.... ha.... the plan, would do it! 
  learning new stuff every day!  the nice part is that the learning never ends 
so, I'll never get bored ;-)  he he he      
   
  

Jacques Kilchoer <Jacques.Kilchoer@xxxxxxxxx> wrote:
      dba_dependencies?
  e.g. this query shows all the tables used by view DBA_SEGMENTS?
   
  set linesize 100
column obj_level format a16
column obj format a40
column refobj format a40
select
   lpad (' ', 2 * (level - 1)) || to_char (level, '999') as obj_level,
   owner || '.' || name || ' (' || type || ')' as obj,
   referenced_owner || '.' || referenced_name || ' (' || referenced_type || ')'
      as refobj
 from dba_dependencies
 start with owner = 'SYS' and name = 'DBA_SEGMENTS'
 connect by prior referenced_owner = owner and prior referenced_name = name
    and prior referenced_type = type
    and type in ('TABLE', 'VIEW') ;

    
---------------------------------
  De : oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] De 
la part de cosmin ioan
Envoyé : vendredi, 9. février 2007 12:20
À : oracle-l@xxxxxxxxxxxxx
Objet : re: determine tables in view (9iR2) 


  
  hi all,
  is there a (relatively) simple query or function to obtain all tables from a 
view, keeping in mind that that view can have many subviews which in turn could 
have many subviews etc etc (recursive func)  
   
  I don't want to re-invent the wheel nor write some funky long pl/sql, if 
something already exists out there  ;-)
   
  thx much,
  Cos

Other related posts: