Physical Backups  «Prev  Next»

Lesson 8 Performing an open database backup
Objective List steps to perform open Database backup.

Steps to perform open Database Backup

For a business that requires constant access to its data, it is mandatory that backups be performed while the database is operating. Oracle provides full access to the database, allowing modifications to all data, while the online database backup is operating. These "hot" backups can then be used for recovery as effectively as "cold" backups. There are several steps to follow to successfully perform an open database backup.

Identify the datafiles

Before beginning a backup on an entire tablespace, identify all of the tablespace's datafiles using the DBA_DATA_FILES data dictionary view. If a specific datafile is to be backed up, use the fully specified filename of the datafile.

Mark the beginning of Tablespace

Mark the beginning of the online tablespace backup by issuing the ALTER TABLESPACE... BEGIN BACKUP command.
This command causes a checkpoint and freezes the datafile header. This freeze prevents the sequence number in the datafile header from changing. In case a future recovery on the datafile is needed, logs are applied from the backup start time (as found in the frozen datafile header). If the DBA forgets to mark the beginning of an online tablespace backup properly, (for example, forgetting to enter the BEGIN BACKUP command), the backup datafiles will not be useful for recovery operations unless the tablespaces being backed up are read-only tablespaces.

Datafile structure

The first block of each datafile is called the datafile header. It contains critical information used to maintain the overall integrity of the database. One of the most critical pieces of information in this header is the checkpoint structure. This is a logical timestamp that indicates the last point at which changes were written to the datafile. This timestamp is critical during an Oracle recovery process as the timestamp in the header determines which redo logs to apply in bringing the datafile to the current point in time.

Back up the datafiles

The DBA uses the operating system command COPY to copy all datafiles in the tablespace to the back up storage.

Mark the end of the tablespace

To avoid performing any unnecessary media recovery, the DBA must end an open database backup properly. Mark the end of the tablespace backup by issuing the ALTER TABLESPACE...END BACKUP command. If you forget to indicate the end of an online tablespace backup and an instance failure or SHUTDOWN ABORT happens, Oracle will assume that media recovery is necessary at the next instance start up. Repeat the above steps for all tablespaces, including SYSTEM, temporary tablespaces, and rollback segment tablespaces.
During the process of open database backup, the database remains available for normal transactions. When a datafile is in backup mode, more redo records may be generated because the LGWR writes to the redo logs and the block images of the changed blocks in backup mode, instead of just writing the row information. The time between the commands ALTER TABLESPACE...BEGIN BACKUP and ALTER TABLESPACE...END BACKUP must be minimized. Therefore, you should perform a backup of one tablespace at a time.
The SlideShow below demonstrates how to perform an open database backup.


1) Open Database Backup 1 2) Open Database Backup 2 3) Open Database Backup 3 4) Open Database Backup 4 5) Open Database Backup 5 6) Open Database Backup 6 7) Open Database Backup 7 8) Open Database Backup 8 9) Open Database Backup 9 10) Open Database Backup 10

Perform Open Database Backup
The next lesson explains the methods and commands used to back up a control file.

Performing Backup - Quiz

Click the Quiz link below to review your understanding of basic database backup concepts.
Performing Backup - Quiz