Structure of metadata and how to use metadata structure in Orale database
Structure of metadata and how to use metadata structure in Oracle database
—-How to Use the Data Dictionary (Metadata) —-
The views of the data dictionary serve as a reference for all database users.
Access the data dictionary views with SQL statements.
Some views are accessible to all Oracle users, and others are intended for database administrators only.
The data dictionary consists of sets of views. In many cases, a set consists of three views
containing similar information and distinguished from each other by their prefixes:
Prefix
Scope
USER :- User’s view (what is in the user’s schema)
ALL :- Expanded user’s view (what the user can access)
DBA :- Database administrator’s view (what is in all users’ schemas)
1. Views with the Prefix USER ———
The views most likely to be of interest to typical database users are those with the prefix USER. These views:
Refer to the user’s own private environment in the database,
including information about schema objects created by the user,
grants made by the user, and so on
Display only rows pertinent to the user
For example, the following query returns all the objects contained in your schema:
SELECT object_name, object_type FROM USER_OBJECTS;
2. Views with the Prefix ALL ——-
Views with the prefix ALL refer to the user’s overall perspective of the database.
These views return information about schema objects to which the user has access through public
or explicit grants of privileges and roles, in addition to schema objects that the user owns.
For example, the following query returns information about all the objects to which you have access:
SELECT owner, object_name, object_type FROM ALL_OBJECTS;
3. Views with the Prefix DBA —–
Views with the prefix DBA show a global view of the entire database.
Synonyms are not created for these views, because DBA views should be queried only by administrators.
SELECT owner, object_name, object_type FROM SYS.DBA_OBJECTS;
Comments
Post a Comment