Database Reference
In-Depth Information
Performing Oracle Online Backups
Oracle online backups are not difficult to do; they just require a few additional steps. In
this section, we will introduce you to Oracle online backups. First, we will discuss online
backups and generally how to do them. We will then present an example of performing an
online backup.
The Mechanics of Online Backups
To do Oracle online backups, your database must be in ARCHIVELOG mode. You can
back up the entire database or you can choose to back up a specific tablespace or set of
tablespaces. If you choose to back up only specific tablespaces, you will not be able to
recover your database until you have at least a base backup of all of its tablespaces. That
said, you can back up the tablespaces at different times if you prefer (though this is not
common practice). For example, you could back up the SYSTEM tablespace on Monday,
the USERS tablespace on Tuesday, and so on. As long as you have a complete cumulative
backup of the database (taken at different times), you can recover it.
To start an online backup, you will need to put each tablespace in hot backup mode. This
can be done by using the ALTER DATABASE BEGIN BACKUP command, or you can individually
put tablespaces in hot backup mode with the ALTER DATABASE BEGIN BACKUP command. After
you have put the tablespaces in hot backup mode, you back up the underlying data files of that
tablespace. If you need to know where the data files related to that tablespace reside, you can
use the DBA_DATA_FILES view.
When a Tablespace is in hot Backup Mode
When you put a tablespace in hot backup mode, Oracle will start writing block-sized
records to the redo logs. These records are much bigger than the normal-sized records,
so this can cause performance problems.
One odd misconception we hear from time to time is that Oracle will stop writing
to the database data files during a hot backup. In fact Oracle will continue to write
changes to the data files; however, it will not update the data file headers until the
backup is complete.
When you put a tablespace in hot backup mode, you are really putting the underlying
data files of that tablespace in hot backup mode. You can determine if a data file is in hot
backup mode by querying the V$BACKUP view. The STATUS column will indicate ACTIVE if
Search WWH ::




Custom Search