script to find out dependency of the tables
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: script to find out dependency of the tables

  1. #1
    Join Date
    Jan 2005
    Posts
    221

    script to find out dependency of the tables

    Has anyone had any scripts to find out dependencies on a given table??? like procedure, trigger, view etc...... on a given table???

    thanks,

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,331
    user_dependencies

  3. #3
    Join Date
    Apr 2003
    Location
    South Carolina
    Posts
    148
    Here's a couple, but ...\rdbms\admin\utldtree.sql should be run first


    rem Dependency Listing for Specified Table
    clear breaks

    break on r_name skip 1
    column r_name format a80
    column name format a80
    column r_link format a80
    set heading off

    select decode(referenced_type, 'NON-EXISTENT', '.....', referenced_type)
    || ' ' || referenced_owner || '.' || referenced_name r_name,
    ' is referenced by: ' || type || ' ' || owner || '.' || name name,
    ' Referenced Link: ' || decode(referenced_link_name, null, 'none',
    referenced_link_name) r_link
    from sys.dba_dependencies
    where referenced_name = '&&table_name'
    order by 1,2;


    ----------------------------------------------------------------
    accept object_type prompt " Type of Object: "
    accept object_owner prompt " Owner of Object: "
    accept object_name prompt " Object Name: "

    execute deptree_fill(upper('&object_type'),upper('&object_owner'),upper('&object_name'));

    select * from ideptree;


    HTH
    Gregg

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width