You are on page 1of 19

Oracle Database 10g: Backup and Recovery 1 - 2

Oracle Database 10g: Backup and Recovery 1 - 3

What Is Backup and Recovery? The phrase backup and recovery refers to the strategies and techniques that are employed by database administrators to protect the database from loss and to reconstruct the database should loss occur.

Oracle Database 10g: Backup and Recovery 1 - 4

Performing Backup and Recovery Operations for an Oracle Database Physical backups are backups of the physical files that comprise your Oracle database, including datafiles, control files, and archived redo log files. You can make backups of your database by using Recovery Manager (RMAN), a utility that creates and manages backups and enables you to perform recovery operations. Alternatively, you can create backups of your database files and perform recovery through a combination of SQL commands and operating system commands. RMAN is the preferred solution for backup and recovery operations for an Oracle database.

Oracle Database 10g: Backup and Recovery 1 - 5

Using Oracle Recovery Manager RMAN is the component of Oracle Database that is used to perform backup and recovery operations. It can make consistent and inconsistent backups, perform incremental or full backups, and back up either the whole database or a portion of it. RMAN uses its own powerful job control and scripting language, as well as a published API that interfaces RMAN with many popular backup software solutions. RMAN can store backups on disk for quick recovery or place them on tape for long-term storage. In order for RMAN to store backups on tape, an interface to the tape device known as a Media Management Library (MML) must be configured. Enterprise Manager supplies a graphical interface to the most commonly used RMAN functionality. Advanced backup and recovery operations are accessible through the RMAN command-line client.

Oracle Database 10g: Backup and Recovery 1 - 6

Recovery Manager Components Recovery Manager executable: The Recovery Manager command-line interface is invoked through the RMAN client application. RMAN interprets user commands and appropriately invokes server sessions to perform the desired tasks. Enterprise Manager: Enterprise Manager Database Control supplies a graphical interface to the most commonly used RMAN functionality. Server sessions: The server processes (UNIX) or threads (Windows) invoked by RMAN connect to the target database to perform the backup, restore, and recovery functions through a PL/SQL interface. These sessions read or write files from or to disk, tape, or the Flash Recovery Area, which is a storage location specified as the default storage area for files related to database recovery. Target database: The database for which backup and recovery operations are being performed using RMAN is called the target database. The control file of the target database contains information about its physical structure, such as the size and location of datafiles, online and archived redo log files, and control files. This information is used by the server sessions invoked by RMAN in backup and recovery operations.

Oracle Database 10g: Backup and Recovery 1 - 7

Using Oracle Secure Backup The Oracle Secure Backup tape management system has been introduced to lower software costs and complexity. Oracle Secure Backup can back up all types of file-system files. Although Oracle Secure Backup has no specialized knowledge of database backup and recovery algorithms, it can serve as a media management layer for Recovery Manager (RMAN) through the system backup to tape (SBT) interface. In this capacity, Oracle Secure Backup provides the same services for RMAN as other supported third-party SBT libraries. Oracle Secure Backup delivers reliable database and file system backup to tape, with support for the major tape drives and libraries accessible through various protocols, including Small Computer System Interface (SCSI), Small Computer System Interface protocol (iSCSI), Network Data Management Protocol (NDMP), and Fibre Channel. Note: Oracle continues to support third-party media management vendors (MMV) through its Backup Solutions Program (BSP). Oracle Secure Backup uses the same RMAN API as thirdparty media management software, so you have a choice of products to use for writing your database backups to tape.

Oracle Database 10g: Backup and Recovery 1 - 9

Overview of Oracle Backup Methods A whole database backup includes all datafiles and at least one control file. Partial database backups may include zero or more tablespaces, zero or more datafiles, and may or may not include a control file. Full backups are non-incremental RMAN backups. You can make a full backup of only one datafile. Full does not refer to how much of the database is backed up, but to the fact that the backup is not incremental. Incremental backups make a copy of all data blocks that have changed since some previous backup. Oracle Database 10g supports two levels of incremental backup (0 and 1). A level 0 or baseline backup is equivalent to a full backup and contains all data blocks. A level 1 cumulative incremental backs up all database blocks changed since the level 0 backup. A level 1 differential incremental backs up all database blocks changed since a level 0 or level 1 backup. To restore using incremental backups, the baseline backup must first be restored, and then the incremental backup. You can make incremental backups with Recovery Manager (RMAN). Offline backups (also known as cold or consistent backups) are taken while the database is not open. They are consistent because at the time of the backup, the system change number (SCN)
Oracle Database 10g: Backup and Recovery 1 - 10

in the datafile headers matches the SCN in the control files.

Oracle Database 10g: Backup and Recovery 1 - 10

When Do You Need to Use a Backup for Recovery? When you experience media failure, such as the loss of a disk drive, you may need to recover your database. This type of recovery typically requires the use of a backup of the affected files. In the case of user errors, when data in the database has been incorrectly updated or deleted, a backup may be required to enable you to recover the database to a point before the unwanted change.

Oracle Database 10g: Backup and Recovery 1 - 12

Responding to User Error When a user error occurs, your recovery options are based on the techniques and features you implemented in anticipation of the error. In later lessons, you investigate tablespace point-in-time recovery, database point-in-time recovery, and Oracle Flashback features.

Oracle Database 10g: Backup and Recovery 1 - 13

Overview of Data Recovery Crash (instance) recovery and media recovery are performed to restore data integrity. Crash recovery happens the first time an Oracle database instance is started after a crash (or SHUTDOWN ABORT). The goal of crash recovery is to bring the datafiles to a transactionconsistent state, preserving all committed changes up to the point when the instance failed. Media recovery is initiated when you have experienced a loss of datafiles or all control files. You can perform a complete recovery to bring the database back to the point of failure by restoring datafiles from a backup and performing a recovery operation. In addition, you can perform an incomplete recovery operation by recovering the database to a named time or system change number (SCN).

Oracle Database 10g: Backup and Recovery 1 - 14

Oracle Database Architecture: Crash Recovery Crash recovery employs two distinct operations: Rolling forward the current, online datafiles by applying both committed and uncommitted transactions contained in online redo records Rolling back changes made in uncommitted transactions to their original state

Oracle Database 10g: Backup and Recovery 1 - 15

Oracle Database Architecture: Recovery After Media Failure Media recovery is used to recover from a lost or damaged current datafile, server parameter file (SPFILE), or control file. It can also recover changes that were recorded in the redo log files but not in the datafiles for a tablespace that went offline without the OFFLINE NORMAL option. Media recovery has the following characteristics: Must be explicitly invoked by the DBA Applies needed changes to datafiles that have been restored from backup, not to online datafiles Requires the use of archived redo log files as well as the online redo log file

Oracle Database 10g: Backup and Recovery 1 - 16

Developing a Backup and Recovery Strategy for Your Oracle Database Developing best practices for backup and recovery of your Oracle database begins with an assessment of all service level criteria for your environment, including recovery point and time objectives, data availability requirements, and data criticality.

Oracle Database 10g: Backup and Recovery 1 - 17

Additional Oracle Solutions for High Availability High availability systems are computing environments configured to provide nearly full-time availability. These systems typically have redundant hardware and software that make them available despite failures. Well-designed high availability systems avoid having single points of failure. When failures occur, the failover processes implemented as part of the system move processing performed by the failed component to backup components. Oracle has a number of products and features that provide high availability in cases of unplanned downtime or planned downtime. In this course, you focus on various backup and recovery techniques that help you to meet high availability needs. Additional Oracle solutions for high availability include Oracle Data Guard, Oracle Real Application Clusters (RAC), Oracle Streams, and LogMiner.

Oracle Database 10g: Backup and Recovery 1 - 18

Oracle High Availability Solutions for Unplanned Downtime Oracle provides high availability solutions for the following types of unplanned downtime: Computer failure: The system on which the database operates is unavailable Storage failure: The storage holding some or all of the database is unavailable Human errors: Unintentional or malicious actions cause data within the database to become logically corrupt or unusable Data corruption: A hardware or software component causes corrupt data to be read or written to the database Site failure: An event causes all or a significant portion of an application to stop processing or slow to an unusable level The table on the following page describes the appropriate Oracle solution for the various types of unplanned downtimes. Additionally, an estimate of recovery time is provided for each. Use this table to help plan the appropriate implementation of Oracle solutions to enable you to meet your recovery goals.

Oracle Database 10g: Backup and Recovery 1 - 19

Oracle Database 10g: Backup and Recovery 1 - 21

You might also like