Obtaining Control File Information


If the control file is something that is important to be able to manage, it is something that you need to be able to find information on. How do you find information about the control files from the database? Table 8.1 provides the data dictionary views that provide information about the control files connected to your database and your instances.

Table 8.1. Data Dictionary Views for Control Files

Data Dictionary View

Description

V$DATABASE

Displays database information from the control file including the following:

CONTROLFILE_TYPE

CONTROLFILE_CREATED

CONTROLFILE_SEQUENCE#

CONTROLFILE_CHANGE#

CONTROLFILE_TIME

V$CONTROLFILE

Lists the names and status of all control files

V$CONTROLFILE_RECORD_SECTION

Displays information about the control file's record sections, how much information is stored in each section of the control file. Information that can be gained from this view includes the following:

TYPE: Identifies the type of record section to which the record pertains. Values include DATABASE, CKPT PROGRESS, REDO THREAD, REDO LOG, DATAFILE, FILENAME, TABLESPACE, LOG HISTORY, OFFLINE RANGE, ARCHIVED LOG, BACKUP SET, BACKUP PIECE, BACKUP DATAFILE, BACKUP REDOLOG, DATAFILE COPY, BACKUP CORRUPTION, COPY CORRUPTION, DELETED OBJECT, or PROXY COPY.

RECORD_SIZE: In bytes

RECORDS_TOTAL: Number of records in the given section

RECORDS_USED: Number of records used in the given section

FIRST_INDEX: Position (INDEX) of the first record

LAST_INDEX: Position (INDEX) of the last record

LAST_RECID: Record ID of the last record in the section

V$PARAMETER

Can be used to display the names of control files as specified in the CONTROL_FILES initialization parameter


The following example lists the names of the control files:

 SELECT NAME FROM V$CONTROLFILE; 

This produces the following output:

 NAME ------------------------------------- /mydatabases/mydb1/control01.ctl /mydatabases2/mydb1/control02.ctl 



    Oracle 9i Fundamentals I Exam Cram 2
    Oracle 9i Fundamentals I Exam Cram 2
    ISBN: 0789732653
    EAN: 2147483647
    Year: 2004
    Pages: 244
    Authors: April Wells

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net