Displaying Dependencies of Views and Synonyms - Oracle Schema

Q.  The following query lists all of the base objects for the synonyms created by user jward. What is displayed by the following example?

SELECT TABLE_OWNER, TABLE_NAME, SYNONYM_NAME
FROM DBA_SYNONYMS
WHERE OWNER = 'JWARD';
The following is the query output:
TABLE_OWNER----TABLE_NAME----SYNONYM_NAME
---------------------- ----------- -----------------
SACHIN---------DEPT----------DEPT
SACHIN---------EMP-----------EMP

- Published on 12 Aug 15

a. Displaying Schema Objects by Type
b. Displaying Dependencies of Views and Synonyms
c. Both A & B
d. None of the above

ANSWER: Displaying Dependencies of Views and Synonyms
 

    Discussion

  • Nirja Shah   -Posted on 25 Sep 15
    1. Displaying Dependencies of Views and Synonyms
    - When you create a view or a synonym, the view or synonym is based on its underlying base object.
    - The ALL_DEPENDENCIES, USER_DEPENDENCIES, and DBA_DEPENDENCIES data dictionary views can be used to reveal the dependencies for a view.
    - The ALL_SYNONYMS, USER_SYNONYMS, and DBA_SYNONYMS data dictionary views can be used to list the base object of a synonym.

    2. Displaying Schema Objects By Type
    - The following query lists all of the objects owned by the user issuing the query:

    SELECT OBJECT_NAME, OBJECT_TYPE
    FROM USER_OBJECTS;

    The following is the query output:

    OBJECT_NAME OBJECT_TYPE
    ------------------------- -------------------
    EMP_DEPT ---------------- CLUSTER
    EMP----------------TABLE
    DEPT----------------TABLE
    EMP_DEPT_INDEX---------------- INDEX
    PUBLIC_EMP----------------SYNONYM
    EMP_MGR----------------VIEW

Post your comment / Share knowledge


Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)