Databases Reference
In-Depth Information
Oracle Backup and Recovery Concepts
Before you jump into Oracle backup and recovery concepts, it's a good idea to review the basic Oracle backup and
recovery architecture. Oracle uses several background processes that are part of the Oracle instance, and some of
these background processes play a vital role in backup and recovery tasks. For a quick understanding of the Oracle
background processes involved in backup and recovery, please see Figure 11-1 (in Chapter 11). Oracle also has several
physical structures that are crucial components of backup and recovery, which we discuss in the following sections.
Backup and Recovery Instance Architecture
The Oracle instance consists of the system global area (SGA), which is the memory allocated to the Oracle instance,
and a set of Oracle processes called the background processes . The Oracle processes start when you start the instance
and keep running as long as the instance is alive. Each of the Oracle background processes is in charge of a specific
activity, such as writing changed data to the data files, cleaning up after disconnected user sessions, and so on. We'll
briefly review the key Oracle background processes that perform critical backup- and recovery-related tasks, which
are the checkpoint process, the log writer process, and the archiver process.
The Checkpoint Process
The checkpoint process does three things:
It signals the database writer process (DBWn) at each checkpoint.
It updates the data file headers with the checkpoint information.
It updates the control files with the checkpoint information.
The Log Writer Process
Oracle's online redo log files record all changes made to the database. Oracle uses a write-ahead protocol, meaning the
logs are written to before the data files. Therefore, it is critical to always protect the online logs against loss by ensuring
they are multiplexed. Any changes made to the database are first recorded in the redo log buffer, which is part of the SGA.
Redo log files come into play when a database instance fails or crashes. Upon restart, the instance will read
the redo log files looking for any committed changes that need to be applied to the data files. Remember, when you
commit, Oracle ensures that what you are committing has first been written to the redo log files before these changes
are recorded in the actual data files. The redo log is the ultimate source of truth for all changes to the data in an Oracle
database, since an instance failure before the changes are written to the data files means that the changes are only in
the redo log files but not in the data files.
The log writer (LGWR) process is responsible for transferring the contents of the redo log buffer to the online redo
log files. The log writer writes to the online redo files under the following circumstances:
At each commit
Every three seconds
When the redo log buffer is one-third full
The important thing to remember here is that the log writer process writes before the database writer does,
because of the write-ahead protocol. Data changes aren't necessarily written to data files when you commit a
transaction, but they are always written to the redo log.
 
Search WWH ::




Custom Search