Results 1 to 5 of 5
  1. #1
    Join Date
    Dec 2003
    Posts
    3

    Unanswered: Extracting database objects in their dependency order

    Hi all,
    I am having problems in extracting the database objects of a schema.
    My problem is that I am able to get all the required objects. but not in the required order.
    Can you please suggest the way in which I can get the required database objects in their dependency order.
    Thank You
    Rashmi H.R
    email: rashmi_h_r@yahoo.com

  2. #2
    Join Date
    Nov 2003
    Location
    Rotterdam, Netherlands
    Posts
    127
    Try building a query using the view
    ALL_DEPENDENCIES. or DBA_DEPENDENCIES.

    Hope this helps you
    regards

  3. #3
    Join Date
    Dec 2003
    Posts
    3

    reciprocal object relation:(

    thanks for the reply.
    Yes I am already using the data dictionary table all_dependencies .
    I am going in a recursive loop getting all the dependencies for each referenced object that is listed by using a query on all_dependencies.

    query:

    select distinct owner ,referenced_type ,referenced_name
    from all_dependencies where referenced_owner=pv_owner and name=pv_object_name
    AND REFERENCED_NAME <> pv_object_name


    and adding them to the list before the initial object that they reference.
    The problem is comming when the object reference is reciprocal
    i.e package1 having reference to package 2 and vice versa . In such cases my loop goes into a kind of infinite loop. To get out of that when ever a second reference is made to the object I am simply adding it to the objects list disturbing the actual order.
    Can you please suggest how to over come this.
    Or any alternate way to get the object in order.

    regards,

  4. #4
    Join Date
    Nov 2003
    Location
    Rotterdam, Netherlands
    Posts
    127
    Ok!!
    I wish i had time to give you a workable query!!!

    In ALL_DEPENDENCIES view use CONNECT BY clause in the query to get a tree structure as output. Just read the documentation for the same.

    I think this will help you...
    regards

  5. #5
    Join Date
    Dec 2003
    Posts
    3
    Originally posted by shelva
    Ok!!
    I wish i had time to give you a workable query!!!

    In ALL_DEPENDENCIES view use CONNECT BY clause in the query to get a tree structure as output. Just read the documentation for the same.

    I think this will help you...
    regards
    I am not able to get query to select all the objects in dependency order using the connect by clause.can you if possible give a more solid example.
    thank you

Posting Permissions

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