learn-oracle






You are just 10 steps away from becoming a Oracle DBA. Materialize your dream by following the The 10 Simple Steps .

PREVIOUS CHAPTER  |  NEXT CHAPTER



Learn Oracle - Whole Database and Partial Database Backups
This section includes these topics:

  • Whole Database Backups
  • Tablespace Backups
  • Datafile Backups
  • Control File Backups

Learn Oracle - Whole Database Backups

A whole database backup includes backups of the current control file along with all datafiles. Whole database backups are the most common type of backup.

Whole database backups do not require Oracle DBA to operate the database in a specific archiving mode. Before performing whole database backups, however, be aware of the implications of backing up in ARCHIVELOG and NOARCHIVELOG modes (refer to "Database Archiving Modes").

learn oracle

A whole database backup is either a consistent backup or an inconsistent backup. Whether or not a backup is consistent determines whether Oracle DBA need to apply redo logs after restoring the backup.

Oracle DBA can make backups of the entire database with the following methods:

  • An operating system utility that makes a separate copy of each individual datafile in the database as well as the current control file
  • The RMAN BACKUP DATABASE command
  • The RMAN COPY DATAFILE command run against each datafile in the database, and the COPY CURRENT CONTROLFILE command run against the control file

Learn Oracle - Tablespace Backups

A tablespace backup is a backup of the datafiles that constitute the tablespace. For example, if tablespace users contains datafiles 2, 3, and 4, then a backup of tablespace users backs up these three datafiles.

Tablespace backups, whether online or offline, are valid only if the database is operating in ARCHIVELOG mode. The reason is that redo is required to make the restored tablespace consistent with the other tablespaces in the database.

The only time a tablespace backup is valid for a database in NOARCHIVELOG mode is when the tablespace is currently read-only or offline-normal. These cases are exceptions because no redo is required to recover them.

  1. Oracle DBA take a tablespace offline normal at some time during day t.
  2. You make a backup of the tablespace at day t + 5.
  3. You restore the tablespace at day t + 10 with the backup made at day t + 5.
  4. You make the tablespace read/write at day t + 15.
learn oracle

Because there were no changes to the offline tablespace between t + 5 and t + 10, no media recovery is needed. If Oracle DBA make the tablespace read/write at t + 15 and then subsequently attempt to restore the t + 5 backup, however, Oracle requires media recovery for the changes after t + 15. Hence, you can only open the database if all necessary redo is located in the online redo logs.

Oracle DBA can make backups of an individual tablespace with the following methods:

  • An operating system utility that makes a separate copy of each datafile in the tablespace
  • The RMAN BACKUP TABLESPACE command
  • The RMAN COPY DATAFILE command run against each datafile in the tablespace

Learn Oracle - Datafile Backups

A datafile backup is a backup of a single datafile. Datafile backups, which are not as common as tablespace backups, are valid in ARCHIVELOG databases. The only time a datafile backup is valid for a database in NOARCHIVELOG mode is if:

  • Every datafile in a tablespace is backed up. You cannot restore the database unless all datafiles are backed up.
  • The datafiles are read-only or offline-normal.
Oracle DBA can make backups of an individual datafile using these methods:

  • An operating system utility
  • The RMAN BACKUP DATAFILE command
  • The RMAN COPY DATAFILE command, which produces a datafile copy

Learn Oracle - Control File Backups

Backing up the control file is a crucial aspect of backup and recovery. Without an accessible control file, you cannot mount or open the database.

If you use RMAN as your backup and recovery solution, and if Oracle DBA run the CONFIGURE CONTROLFILE AUTOBACKUP command, then RMAN automatically backs up the control file whenever you run backup and copy jobs. This backup is called a control file autobackup. Because the autobackup uses a default filename, RMAN can restore this backup even if the RMAN repository is unavailable. Hence, this feature is extremely useful in a disaster recovery scenario.

Oracle DBA can make manual backups of the control file by using the following methods:

  • The RMAN BACKUP CURRENT CONTROLFILE creates an RMAN-specific backup of the control file, and the COPY CURRENT CONTROLFILE command creates an image copy of the control file.
  • The SQL statement ALTER DATABASE BACKUP CONTROLFILE makes a binary backup of the control file.
  • The SQL statement ALTER DATABASE BACKUP CONTROLFILE TO TRACE exports the control file contents to a SQL script file. You can use the script to create a new control file. Trace file backups have one major disadvantage: they contain no records of archived redo logs, offline ranges for datafiles, and RMAN backups and copies. For this reason, binary backups are preferable.

Learn Oracle - Archived Redo Log Backups

Archived redo logs are essential for recovering an inconsistent backup. The only way to recover an inconsistent backup without archived logs is to use RMAN incremental backups. To be able to recover a backup through the most recent log, every log generated between these two points must be available. In other words, Oracle DBA cannot recover from log 100 to log 200 if log 173 is missing. If log 173 is missing, then you must halt recovery at log 172 and open the database with the RESETLOGS option.

Because archived redo logs are essential to recovery, you should back them up regularly. If Oracle DBA use a media manager, then back them up regularly to tape.

Oracle DBA can make backups of archived logs by using the following methods:

  • An operating system utility
  • The RMAN BACKUP ARCHIVELOG command
  • The RMAN BACKUP ... PLUS ARCHIVELOG or BACKUP ... PLUS ARCHIVELOG commands
  • The RMAN COPY ARCHIVELOG command
PREVIOUS CHAPTER  |  NEXT CHAPTER



More Tutorials on Oracle dba ...




Liked it ? Want to share it ? Social Bookmarking
Add to: Mr. Wong Add to: BoniTrust Add to: Newsider Add to: Digg Add to: Del.icio.us Add to: Reddit Add to: Jumptags Add to: StumbleUpon Add to: Slashdot Add to: Netscape Add to: Furl Add to: Yahoo Add to: Spurl Add to: Google Add to: Blinklist Add to: Technorati Add to: Newsvine Information


Source : Oracle Documentation | Oracle DBA

Want to share or request Oracle Tutorial articles to become a Oracle DBA. Direct your requests to webmaster@oracleonline.info

<%=DisplayLinks(3,""," - ","","")%>