The Data Dictionary

Each Oracle database includes a set of what is called metadata, or data that describes the structure of the data contained by the database. The tables and views that hold this metadata are referred to as the Oracle Data Dictionary. All the components discussed in this chapter have corresponding system tables and views in the data dictionary that fully describe the characteristics of the component. You can query these tables and views using standard SQL statements. Table 2-1 shows how you can find information about each of the components in the data dictionary.

Data dictionary tables that are preceded by the V$ or GV$ prefixes are dynamic tables, which are continually updated to reflect the current state of the Oracle database. Static data dictionary tables can have a prefix such as DBA_, ALL_, or USER_ to indicate the scope of the objects listed in the view.

Table 2-1. Database Components and Their Related Data Dictionary Views

Component

Data Dictionary Tables and Views

Database

V$DATABASE

Tablespaces

DBA_TABLESPACES, DBA_DATA_FILES, DBA_FREE_SPACE

Control files

V$CONTROLFILE, V$PARAMETER, V$CONTROLFILE_RECORD_SECTION

Datafiles

V$DATAFILE, V$DATAFILE_HEADER, V$FILESTAT, DBA_DATA_FILES

Segments

DBA_SEGMENTS

Extents

DBA_EXTENTS

Redo threads, groups, and numbers

V$THREAD, V$LOG, V$LOGFILE

Archiving status

V$DATABASE, V$LOG, V$ARCHIVED_LOG, V$ARCHIVE_DEST

Database instance

V$INSTANCE, V$PARAMETER, V$SYSTEM_PARAMETER

Memory structure

V$SGA, ...

Get Oracle Essentials: Oracle9i, Oracle8i and Oracle8, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.