Database Reference
In-Depth Information
This information will be essential when configuring for backups and also when you
need to recover your database from failure. Throughout this topic you will be using the
data dictionary, and it behooves you to become comfortable with it.
Forms of the Data Dictionary
The data dictionary views are named using a common naming convention. This convention
can be used to identify the source of the data and when a view can be queried. The main
types of data dictionary views are as follows:
We are introducing the CDB_* views here. We will not be covering the
Multitenant Database option of the Oracle Database in detail in this
chapter. Please see Chapter 12, “Managing Oracle Multitenant Data-
bases,” for more details on this option.
Static Data Dictionary Views The static data dictionary views are sourced from tables
and views created when the database was first created. These tables and views are owned
by the SYS schema and are located in the SYSTEM tablespace. The views typically contain
structural metadata about the database, including such things as tables, indexes, and other
database objects.
If you are running Oracle Multitenant, you will find versions of these views in each pluggable
database (PDB) contained within the container database (CDB). Also you will find versions
of these views in the root container. The scope of what is contained in these views varies
depending on the PDB you are in, the user you are connected as, and the state of the data-
base. Please see the chapters on Oracle multitenant databases for more information on what
is contained in these views when using Oracle Multitenant.
The names of these views are all prefixed to indicate the scope of the data contained within
that view. There are four main prefixes:
DBA_* The DBA_* views allow those with DBA privileges to see all data contained in the
view. For example, if you were a DBA and you wanted to see all tables in the database
named MY_DATA , you could query the DBA_TABLES view, as shown here:
Select owner, table_name from dba_tables
Where owner='MY_DATA';
ALL_* The scope of the ALL_* views is more reduced than that of the DBA_* views. When
you query the ALL_* views, you see only those objects for which you have been granted
some form of access. For example, if you wanted to see all instances of a table called
MY_DATA that you had access to, you could query the ALL_TABLES view, as shown here:
Select owner, table_name from all_tables;
USER_* The USER_* views are the most restrictive of the data dictionary views. When
you query the USER_* views, you see only those objects that are in the schema you are
Search WWH ::




Custom Search