How to find the level of oracle objects dependencies...

Hi,

in oracle if we have to find the dependencies we use "all_dependencies", how ever if
we have to find level of dependencies then how should we go about it,

example as shown below;

master object : tablel1
view 1:            v_test using table1

view 2:            v_test2 using v_test

view 3:            v_test3 using v_test2:


so in this case

the master table1 is having level of dependency 0

v_test is having level of dependency 1

v_test2 is having level of dependency 2

v_test3 is having level of dependency 3

and so on....

i hope i am clear in my question,

plz assist,

regards
uv
Published by: W Nicloei on October 7, 2008 19:53

You can use a hierarchical query on the USER_ / ALL_ / table of DBA_DEPENDENCIES, i.e.

select level, a.*
  from dba_dependencies a
 start with referenced_name = 'DEPT'
        and owner = 'SCOTT'
connect by nocycle prior owner = referenced_owner
               and prior name = referenced_name
order siblings by name

Justin

Tags: Database

Similar Questions

  • How to find the level of update rollup

    Hello

    I would like to know the current level of update rollup applied for all SCM modules and finance, listed below.

    We are in * 12.1.3 with 11.2.0.3 database on Linux 5 *.

    Supply chain
    1 oracle I have procurement (ICX)
    2 buy a (IN.)
    3 sourcing (PON)
    4. the inventory (NAV) (Note: WMS not installed)
    5 order Management (Ontario)
    6 Shipment Execution (WSH)
    7. cost Management (CST)

    Finance
    1. Accounts Payable (SQLAP)
    2. receivables (AR)
    3. cash Management (CE)
    4 Assets (OFA)
    5 general Ledger (SQLGL)
    6 subledger Accounting (XLA)


    Please help me how can I find the required information, waiting for your answer.


    Thank you

    user11969666 wrote:
    Hello

    I would like to know the current level of update rollup applied for all SCM modules and finance, listed below.

    We are in * 12.1.3 with 11.2.0.3 database on Linux 5 *.

    Supply chain
    1 oracle I have procurement (ICX)

    9249326 R12. ICX. B.3 ICX

    2 buy a (IN.)

    9249328 R12. In. in. B.3

    3 sourcing (PON)

    9249327 R12. PON. B.3 SOP

    4. the inventory (NAV) (Note: WMS not installed)

    9242191 R12. B.3 INV INV.

    5 order Management (Ontario)

    9244129 R12. B.3 ONTARIO HAVE

    6 Shipment Execution (WSH)

    9244435 R12. WSH. B.3 wsh

    7. cost Management (CST)

    If his oracle landed cost management
    9244459 R12. INL. B.3
    Please confirm its INL or CSE?

    >

    Finance
    1. Accounts Payable (SQLAP)

    9244867 R12. BPM B.3

    2. receivables (AR)

    AR ar 14689993 B R12.ar.B.3

    3. cash Management (CE)

    13024047 what this R12.ce.B.3 B

    4 Assets (OFA)

    9244841 R12.FA. B.3 fa

    5 general Ledger (SQLGL)

    9244874 R12.GL. B.3 gl

    6 subledger Accounting (XLA)

    9244854 R12. XLA. B.3 xla

    Please confirm each of them by running the following query
    Select patch_level in the fnd_product_installations where patch_level like '% ICX % ';

    like wise

    ;) AppsMAsti ;)
    sharing is caring

  • How to find the error in oracle forms

    Dear gurus,

    I am newbie in oracle forms. I have a form with many items. In this regard, certain elements are not met. These elements are filled from four different cursors depending on certain conditions. for example,.
    IF <condtion1> true then
     open cursor1;
       populate all the items  from cursor1 columns
    elsif <condition2>true then
       open cursor2;
        populate all the items  from cursor2 columns
    elsif<condtion3>true then
        open cursor3;
       populate all items  from curso3r  columns
    elsif<condtion4>true then
        open cursor4;
       populate all items  from cursor4  columns
    This cursors are written to the database level.
    Now, I want to know what slider elements become values.

    My TL told me to find this, put messages. But I don't know where I put message [or in forms or cursors?]. Is an easy way to find errors in its present form?

    Thank you all.

    My TL told me to find this, put messages. But I don't know where I put message [or in forms or cursors?].

    You can add messages to your forms code in your conditional statement. For example, using your code sample:

    IF  true then
     open cursor1;
       Clear_Message;
       Message('Using Cursor 1');
       Message(' ');
       populate all the items  from cursor1 columns
    elsif true then
       Clear_Message;
       Message('Using Cursor 2');
       Message(' ');
       open cursor2;
       populate all the items  from cursor2 columns
    elsiftrue then
       Clear_Message;
       Message('Using Cursor 3');
       Message(' ');
       open cursor3;
       populate all items  from curso3r  columns
    elsiftrue then
       Clear_Message;
       Message('Using Cursor 4');
       Message(' ');
       open cursor4;
       populate all items  from cursor4  columns
    

    If your form works and you troubleshoot just a mistake, I wouldn't recommend restructure you your form. If the current process is inefficient or not, it has been tested and proved to a certain extent. Unless the form has many problems, I would keep the way it is and just solve the problem at hand! :)

    Is an easy way to find errors in its present form?

    You don't mention your version of Oracle Forms, but rather than adding messages to the code; I recommend that you use the debugger to step through your code forms so that you can see the enforcement code that is causing the problem. (Note: the debugger of forms can only step through you the code in the form.) If your cursors are in a data base/package procedure - all you will see is the call of this procedure of database/package - not the code in the procedure/package).

    If you are using Forms 6i, simply add the "break." part of the code you want to debug. If you use Forms 9i or higher, then you will need to be able to run your form from forms manufacturer; which requires a configuration to make it work. Once configured, simply select the line you want to break the and press F5 for enabled or disabled a breakpoint. Then run your form by using the option 'run Debug form '.

    If you really want to reegineer your form to use a query in the From Clause, take a look to forms: how - a block based on a query FROM Clause for more information on the query from Clause.

    Now, I want to know what slider elements become values. The link Christian listed is also a very good article on using queries in the From Clause.

    Hope this helps,
    Craig B-)

    If someone useful or appropriate, please mark accordingly.

  • How to find the difference between standard edition and standard edition one

    How to find the difference between oracle database standard edition and standard edition one 64 bit

    (a) using sql
    (b) using the configuration/installation files

    How to find the difference between oracle database standard edition and standard edition one 64 bit

    (a) using sql

    Select * the option of $ v;

    (b) using the configuration/installation files

    opatch lsinventory-details

  • How to find the child level for each table in a relational model?

    Earthlings,

    I need your help, and I know that, "Yes, we can change." Change this thread to a question answered.

    So: How to find the child level for each table in a relational model?

    I have a database of relacional (9.2), all right?
    .
         O /* This is a child who makes N references to each of the follow N parent tables (here: three), and so on. */
        /↑\ Fks
       O"O O" <-- level 2 for first table (circle)
      /↑\ Fks
    "o"o"o" <-- level 1 for middle table (circle)
       ↑ Fk
      "º"
    Tips:
    -Each circle represents a table;
    -Red no tables have foreign key
    -the picture on the front line of tree, for example, a level 3, but when 3 becomes N? How is N? That is the question.

    I started to think about the following:

    First of all, I need to know how to take the kids:
    select distinct child.table_name child
      from all_cons_columns father
      join all_cons_columns child
     using (owner, position)
      join (select child.owner,
                   child.constraint_name fk,
                   child.table_name child,
                   child.r_constraint_name pk,
                   father.table_name father
              from all_constraints father, all_constraints child
             where child.r_owner = father.owner
               and child.r_constraint_name = father.constraint_name
               and father.constraint_type in ('P', 'U')
               and child.constraint_type = 'R'
               and child.owner = 'OWNER') aux
     using (owner)
     where child.constraint_name = aux.fk
       and child.table_name = aux.child
       and father.constraint_name = aux.pk
       and father.table_name = aux.father;
    Thought...
    We will share!

    Thanks in advance,
    Philips

    Published by: BluShadow on April 1st, 2011 15:08
    formatting of code and hierarchy for readbility

    Have you looked to see if there is a cycle in the graph of dependence? Is there a table that has a foreign key to B and B has a back of A foreign key?

    SQL> create table my_emp (
      2    emp_id number primary key,
      3    emp_name varchar2(10),
      4    manager_id number
      5  );
    
    Table created.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  create table my_mgr (
      2    manager_id number primary key,
      3    employee_id number references my_emp( emp_id ),
      4    purchasing_authority number
      5* )
    SQL> /
    
    Table created.
    
    SQL> alter table my_emp
      2    add constraint fk_emp_mgr foreign key( manager_id )
      3         references my_mgr( manager_id );
    
    Table altered.
    
    SQL> ed
    Wrote file afiedt.buf
    
      1   select level lvl,
      2          child_table_name,
      3          sys_connect_by_path( child_table_name, '/' ) path
      4     from (select parent.table_name      parent_table_name,
      5                  parent.constraint_name parent_constraint_name,
      6                  child.table_name        child_table_name,
      7                  child.constraint_name   child_constraint_name
      8             from user_constraints parent,
      9                  user_constraints child
     10            where child.constraint_type = 'R'
     11              and parent.constraint_type = 'P'
     12              and child.r_constraint_name = parent.constraint_name
     13           union all
     14           select null,
     15                  null,
     16                  table_name,
     17                  constraint_name
     18             from user_constraints
     19            where constraint_type = 'P')
     20    start with child_table_name = 'MY_EMP'
     21*  connect by prior child_table_name = parent_table_name
    SQL> /
    ERROR:
    ORA-01436: CONNECT BY loop in user data
    

    If you have a cycle, you have some problems.

    (1) it is a NOCYCLE keyword does not cause the error, but that probably requires an Oracle version which is not so far off support. I don't think it was available at the time 9.2 but I don't have anything old enough to test on

    SQL> ed
    Wrote file afiedt.buf
    
      1   select level lvl,
      2          child_table_name,
      3          sys_connect_by_path( child_table_name, '/' ) path
      4     from (select parent.table_name      parent_table_name,
      5                  parent.constraint_name parent_constraint_name,
      6                  child.table_name        child_table_name,
      7                  child.constraint_name   child_constraint_name
      8             from user_constraints parent,
      9                  user_constraints child
     10            where child.constraint_type = 'R'
     11              and parent.constraint_type = 'P'
     12              and child.r_constraint_name = parent.constraint_name
     13           union all
     14           select null,
     15                  null,
     16                  table_name,
     17                  constraint_name
     18             from user_constraints
     19            where constraint_type = 'P')
     20    start with child_table_name = 'MY_EMP'
     21*  connect by nocycle prior child_table_name = parent_table_name
    SQL> /
    
           LVL CHILD_TABLE_NAME               PATH
    ---------- ------------------------------ --------------------
             1 MY_EMP                         /MY_EMP
             2 MY_MGR                         /MY_EMP/MY_MGR
             1 MY_EMP                         /MY_EMP
             2 MY_MGR                         /MY_EMP/MY_MGR
    

    (2) If you try to write on a table and all of its constraints in a file and do it in a valid order, the entire solution is probably wrong. It is impossible, for example, to generate the DDL for MY_EMP and MY_DEPT such as all instructions for a table come first, and all the instructions for the other are generated second. So even if NOCYCLE to avoid the error, you would end up with an invalid DDL script. If that's the problem, I would rethink the approach.

    -Generate the DDL for all tables without constraint
    -Can generate the DDL for all primary key constraints
    -Can generate the DDL for all unique key constraints
    -Can generate the DDL for all foreign key constraints

    This is not solidarity all the DOF for a given in the file object. But the SQL will be radically simpler writing - there will be no need to even look at the dependency graph.

    Justin

  • How to find the function to remove the ink level

    Can someone please tell me how to find the function "for the removal of the ink level window" I need know when I use no to factory ink cartridges. I have Windows XP, but this is probably not important.

    Hi Laura,

    Find things such as ink levels is a function of the printer driver.

    This is provided by the manufacturer of the printer, and they are the best resource on the operation of their particular drivers.  Therefore, it is best to ask the manufacturer of the printer for advice on this issue.

    Sometimes, there is an icon in the taskbar that you can get this information.  Yet once, it is a function of the driver and the printer software.

    For reference:

    Check on a printer ink levels

    http://Windows.Microsoft.com/en-us/Windows-Vista/check-ink-levels-on-a-printer

    How can I check my ink or toner levels?

    http://Windows.Microsoft.com/en-us/Windows7/how-do-I-change-my-ink-or-toner-levels

  • What is the last level of patch bundle for x 3-2 exadata machine? How to find the doc?

    We have a x 3-2 exadata machine. I have a question: what is the last level of patch bundle for x 3-2 exadata machine? How to find the doc?

    Thanks in advance.

    Check note id 888828.1

    It has all the information you need.

  • How to find the name of the Oracle database server?

    People,

    Hello. I installed Oracle Database 11 g 2 OS Oracle Linux 5. The installed directory is/home/user/OracleDB_Home and/home/user/OracleDB_Base.

    Host name is "mylinux". Name of the database instance is PT853.

    I use "mylinux" as the name of the database server, it does not work. I use another way to do as below:

    Export ORACLE_HOME = / home/user/OracleDB_Home

    Can I use "mylinux ORACLE_HOME" as the name of the database server, it does not work either.


    My question is:

    How to find the name of the database server Oracle with Oracle Linux 5 OS?


    Thank you.

    You must learn the basic of database Oracle.

    Please don't regard it not same as SQL server in terms of configuration.

    You never specify the database server name in Oracle.

    You specify the host name in only two places, 1) Tnsnames.ora/JDBC/ODBC (or any client you want to connect) and listener.ora) 2.

    There was nothing called specify the name of the Oracle database from an oracle database server.

    Concerning

    Anurag.

  • How to find the position of the special charater such as [@% in oracle]

    How to find the position of the special charater such as [@% in oracle in the sql query]

    Exp: -.

    SELECT Regexp_instr (['test] "," [!]) » #$% & * ; <> = @\ ^ _'{|} ~]')

    DOUBLE;

    Hello

    SELECT REGEXP_INSTR (' TSA @', "[@] '")
    FROM DUAL;

    SELECT REGEXP_INSTR ('asd [', ' [[]] "])
    FROM DUAL;

    SELECT REGEXP_INSTR ('asd %', '[%]')
    FROM DUAL;

  • How to find the number of users connected to the database of the level operating system (Linux)

    Hi all

    Could someone knows how to find the number of users connected to the database without connection with sql * more

    y at - it a command to find?

    example, we have 10 databases in a server, how to find the number of users connected to the special data base without connecting to database(v$session)?

    the Oracle version:-10g, 11g
    Operating system:-OEL4, OEL5, AIX, Solaris

    any help will be appreciated.

    Thanks in advance.

    Thank you.

    Kind regards
    Rajesh.

    but you can say total number of connection with the above given the command? It would also be useful to know.

    See you soon,.
    LKM

  • How to find the ANGLE b/w two edges in Oracle Spatial

    How to find the ANGLE b/w two edges on Oracle Spatial. I have two edge connected on the same node. I wanted to know the angle betwwn them. Can someone help me?

    Ok. My first example is an approximation. Further you get North or South of the Ecuador, gets the more vague.
    This one should do the trick with some degree of precision.

    declare
      PI constant number := 3.14159265358979;
      g1 sdo_geometry;
      g2 sdo_geometry;
      g3 sdo_geometry;
    
      angle1 number;
      angle2 number;
    
      FUNCTION POINT(P_LAT  IN number
                    ,P_LONG IN number)
        RETURN MDSYS.SDO_GEOMETRY IS
      BEGIN
        -- we load both the ordinate array and the point type because some spatial functions show inconsistent behavior
        -- it is not important for this example, just something to be aware of
        return(mdsys.sdo_geometry(2001,8307 -- WGS84
                                 ,mdsys.sdo_point_type(p_long,p_lat,null)
                                                      ,mdsys.sdo_elem_info_array(1,2,1)
                                                      ,mdsys.sdo_ordinate_array(p_long,p_lat)));
      END;
    
    begin
    
      -- For the example, project in WGS84
      -- g1,g2,g3 could also come straight out of the database as sdo_geometry
      g1 := point(50, 7);          -- Point A
      g2 := point(51, 7);          -- Point B
      g3 := point(50,10);          -- Point C
    
      angle1 := atan2(g2.sdo_point.x - g1.sdo_point.x,
                      g2.sdo_point.y - g1.sdo_point.y);
      angle2 := atan2(g3.sdo_point.x - g1.sdo_point.x,
                      g3.sdo_point.y - g1.sdo_point.y);
    
      -- depending on rotation and where we are on the planet, adjustments may be needed
      if angle1 < 0      then angle1 := angle1 + 2 * PI; end if;
      if angle2 < 0      then angle2 := angle2 + 2 * PI; end if;
      if angle2 < angle1 then angle2 := angle2 + 2 * PI; end if;
    
      dbms_output.put_line('Angle between the lines A-B and A-C: '||
                           round(sdo_util.convert_unit(angle2-angle1,'Radian','Degree'),1));
    end;
    
    Angle between the lines A-B and A-C: 90
    
  • How to extract the metadata for an object in Oracle 7.3.4.3.0

    Hi all

    The Prod database is on Oracle 7, 7.3.4.3.0 with the 64 bit version.

    I need to get the code used in the procedure, functions, packages and triggers in the database, to reproduce the problems in Oracle 10 g.

    I know that dbms_metadata.get_ddl () is used to get the metadata. However, it is not available in Oracle7. Then couldn't a Tips how to get the metadata in Oracle 7.

    Thank you

    The code should be ALL_SOURCE or the SYS. Table of $ SOURCE.

    Refer to the Oracle data dictionary views 7 server reference chapter
    http://docs.Oracle.com/CD/A57673_01/doc/Server/doc/SRF73/CH2A.htm#toc018

    Here's the main doc link if you need it.
    http://docs.Oracle.com/CD/A57673_01/index.htm

  • How to find the last date of execution of the objects in database

    Hi all

    We're going for an upgrade of the database 11g and for the same thing, we want to know the last date of the following-

    Packages, Tables, views
    Conc. programs / value Sets / look up / profile options

    Is there a way we can find the same thing.
    The answers would be really useful.

    Kind regards
    Shruti

    So can you provide clues on how to find the last opportunity registration

    I don't think you can find such a script with having activated audit.

    Thank you
    Hussein

  • How to find the ID of a submit button in oracle seeded pages

    Hello

    I tried downloading the page locally and I try to open using jdev, but "oa:popup" is not valid message is coming.

    So I can not open this page so not able to see the ID of the button.

    Can you tell me how to find the ID in another way.

    Hello

    If your cannot open page in jdev, then copy the page (xml file) from the server and save to anywhere on your local computer, which opened in Notepad, here you can find the ID of your button required. However, the norm is to open the page in jdev
    Haroon.

  • How to find the culprit?

    Hello

    EBS R12
    RHEL 4.6

    I was monitoring the performance of our EBS Linux server using 'top' command, and I got this monitor Display:
    top - 22:43:43 up 52 days,  1:57,  6 users,  load average: 0.99, 0.49, 0.30
    Tasks: 549 total,   2 running, 547 sleeping,   0 stopped,   0 zombie
    Cpu(s): 12.8% us,  0.5% sy,  0.0% ni, 86.5% id,  0.2% wa,  0.0% hi,  0.0% si
    Mem:   8309152k total,  8225644k used,    83508k free,     3752k buffers
    Swap: 10482308k total,  1993040k used,  8489268k free,  3575124k cached
    
      PID USER      PR  NI %CPU    TIME+  %MEM  VIRT  RES  SHR S COMMAND
    12778 oradev2   25   0  100   1:57.33  1.7 1165m 135m 101m R oracle
    14329 applprod  15   0    5   2:09.04  0.1 46300 7780 4204 S httpd
    12960 appldev   16   0    1   0:00.25  0.0  2620 1304  784 R top
    13945 oraprod   16   0    0   0:00.49  0.2 1119m  17m  15m S oracle
    15100 oraprod   16   0    0   0:05.16  0.9 1121m  69m  65m S oracle
        1 root      16   0    0   0:22.47  0.0  3504  508  432 S init
    I see that oradev2 has a very CPU usage, I am suspecting a program the sql inside it is :(
    How can I find the guilty program (Oracle level) that is hugging all the processors?


    Thank you very much

    Hello

    Try the following:

    SQL> select  s.sid, p.spid
    from v$session s, v$process p
    where s.paddr = p.addr
    and p.addr = '12778';
    
    SQL> select q.sql_text
    from v$session a, v$sql q
    where a.sql_address=q.address
    and a.sid=; 
    

    Kind regards
    Hussein

Maybe you are looking for