Notes on ORACLE 10
g from the book Oracle Database 10g DBA Handbook By
Kevin Loney
Oracle
Physical Storage Structures
·
The Oracle database uses a
number of physical storage structures on disk to hold and manage the data from
user transactions.
·
Some of these storage
structures, such as the datafiles, redo log files,and archived redo log files,
hold actual user data
·
Control files, maintain the
state of the database objects
·
text-based alert and trace
files contain logging information for both routine events and error conditions
in the database.
Datafiles
Every Oracle database must contain at least one datafile.
Every Oracle database must contain at least one datafile.
One Oracle datafile
corresponds to one physical operating system file on disk.
B.Sc(C.S.)ORACLE 10gChapter 1
Each datafile in an
Oracle database is a member of one and only one tablespace; a tablespace,
however, can consist of many datafiles. (A BIGFILE tablespace consists of
exactly one datafile.)
An Oracle datafile may automatically expand when it runs out of space, if the DBA created the datafile with the AUTOEXTEND parameter.
An Oracle datafile may automatically expand when it runs out of space, if the DBA created the datafile with the AUTOEXTEND parameter.
The DBA can also
limit the amount of expansion for a given datafile by using the MAXSIZE
parameter.
The datafile is the
ultimate resting place for all data in the database. Frequently accessed blocks
in a datafile are cached in memory
Redo
Log Files
Whenever data is added, removed, or changed in a table, index, or other Oracle object, an entry is written to the current redo log file. Every Oracle database must have at least two redo log files, because Oracle reuses redo log files in a circular fashion.
Whenever data is added, removed, or changed in a table, index, or other Oracle object, an entry is written to the current redo log file. Every Oracle database must have at least two redo log files, because Oracle reuses redo log files in a circular fashion.
When one redo log
file is filled with redo log entries, the current log file is marked as ACTIVE, if it is still needed for
instance recovery,or INACTIVE
Control
Files
Every Oracle database has at least one control file that maintains the metadata of the database.
it contains the name of the database, when the database was created, and the names and locations of all datafiles and redo log files.
Every Oracle database has at least one control file that maintains the metadata of the database.
it contains the name of the database, when the database was created, and the names and locations of all datafiles and redo log files.
The control file
maintains information used by Recovery Manager (RMAN), such as the persistent
RMAN settings and the types of backups that have been performed on the
database. Whenever any changes are made to the structure of the database, the
information about the changes is immediately reflected in the control file.
The alter database backup controlfile to
trace command is another way to back up the control file.
Archived Log Files
Archived Log Files
B.Sc(C.S.)ORACLE 10gChapter 1
An Oracle database
can operate in one of two modes: archivelog or noarchivelog mode.
When the database is in noarchivelog mode, the circular reuse of
the redo log files means that redo
entries are no longer available in case of a failure to a disk drive or another
media-related failure.
Operating in noarchivelog
mode does protect the integrity of the
database in the event of an instance failure or system crash, because all
transactions that are committed but not yet written to the datafiles are
available in the online redo log files.
In contrast, archivelog mode sends a filled redo log file to one or more specified destinations and can be available to reconstruct the database at any given point in time in the event that a database media failure occurs..
Initialization Parameter Files
When a database instance starts, the memory for the Oracle instance is allocated, and one of two types of initialization parameter files is opened:
In contrast, archivelog mode sends a filled redo log file to one or more specified destinations and can be available to reconstruct the database at any given point in time in the event that a database media failure occurs..
Initialization Parameter Files
When a database instance starts, the memory for the Oracle instance is allocated, and one of two types of initialization parameter files is opened:
1] a text-based file
called init<SID>.ora known a PFILE
2] a server parameter
file known as an SPFILE.
The instance first looks for an SPFILE in the
default location for the operating system
The startup command can explicitly specify a PFILE to use for startup.
The startup command can explicitly specify a PFILE to use for startup.
Alert
and Trace Log Files
When things go wrong, Oracle can and often does write messages to the alert log and, in the case of background processes or user sessions, trace log files.
The alert log file, located in the directory specified by the initialization parameter
BACKGROUND_DUMP_DEST, contains both routine status messages as well as error conditions.
When the database is started up or shut down, a message is recorded in the alert log, along with a list of initialization parameters that are different from their default values. In
When things go wrong, Oracle can and often does write messages to the alert log and, in the case of background processes or user sessions, trace log files.
The alert log file, located in the directory specified by the initialization parameter
BACKGROUND_DUMP_DEST, contains both routine status messages as well as error conditions.
When the database is started up or shut down, a message is recorded in the alert log, along with a list of initialization parameters that are different from their default values. In
B.Sc(C.S.)ORACLE 10gChapter 1
addition, any alter database or alter system commands issued by the DBA
are recorded.
The trace files for
the Oracle instance background processes are also located in
BACKGROUND_DUMP_DEST.
BACKGROUND_DUMP_DEST.
These trace files are located in the directory
specified by the initialization parameter USER_DUMP_DEST.
Backup
Files
Backup files can originate from a number of sources, such as
Backup files can originate from a number of sources, such as
1] operating system copy commands
2] Oracle Recovery Manager (RMAN).
2] Oracle Recovery Manager (RMAN).
If the DBA performs a
“cold” backup, the backup files are simply operating system copies of the
datafiles, redo log files, control files, archived redo log files, and so
forth.
In addition to bit-for-bit image copies of datafiles (the default in RMAN), RMAN can generate full and incremental backups of datafiles, control files, archived redo log files, and SPFILEs that are in a special format, called backupsets, only readable by RMAN. RMAN backupset backups are generally smaller than the original datafiles because RMAN does not back up unused blocks.
In addition to bit-for-bit image copies of datafiles (the default in RMAN), RMAN can generate full and incremental backups of datafiles, control files, archived redo log files, and SPFILEs that are in a special format, called backupsets, only readable by RMAN. RMAN backupset backups are generally smaller than the original datafiles because RMAN does not back up unused blocks.
Oracle
Managed Files
Oracle Managed Files (OMF), introduced in Oracle version 9i, makes the DBA’s job easier by automating the creation and removal of the datafiles that make up the logical structures in the database.
Without OMF, a DBA might drop a tablespace and forget to remove the underlying operating system files. This makes inefficient use of disk resources, and it unnecessarily increases backup time for datafiles that are no longer needed by the database.
OMF is well suited for small databases with a low number of users and a part-time DBA,
Password Files
An Oracle password file is a file within the Oracle administrative or software directory
Oracle Managed Files (OMF), introduced in Oracle version 9i, makes the DBA’s job easier by automating the creation and removal of the datafiles that make up the logical structures in the database.
Without OMF, a DBA might drop a tablespace and forget to remove the underlying operating system files. This makes inefficient use of disk resources, and it unnecessarily increases backup time for datafiles that are no longer needed by the database.
OMF is well suited for small databases with a low number of users and a part-time DBA,
Password Files
An Oracle password file is a file within the Oracle administrative or software directory
structure on disk
used to authenticate Oracle system administrators for tasks such as creating a
database or starting up and shutting down the database.
B.Sc(C.S.)ORACLE 10gChapter 1
The privileges
granted through this file are the SYSDBA and SYSOPER privileges. Authenticating
any other type of user is done within the database itself; because the database
may be shut down or not mounted, another form of administrator authentication
is necessary in these cases.
The Oracle command-line utility orapwd creates a password file if one does not exist or is damaged. Because of the extremely high privileges granted via this file, it should be stored in a secure directory location that is not available to anyone except for DBAs and operating system administrators. Once this file is created, the initialization parameter REMOTE_LOGIN_PASSWORDFILE should be set to EXCLUSIVE to allow users other than SYS to use the password file.
The Oracle command-line utility orapwd creates a password file if one does not exist or is damaged. Because of the extremely high privileges granted via this file, it should be stored in a secure directory location that is not available to anyone except for DBAs and operating system administrators. Once this file is created, the initialization parameter REMOTE_LOGIN_PASSWORDFILE should be set to EXCLUSIVE to allow users other than SYS to use the password file.
No comments:
Post a Comment