BR*Tools with Oracle Recovery Manager

22
BR*Tools with Oracle Recovery Manager White Paper: Oracle Database Administration February 2012

Transcript of BR*Tools with Oracle Recovery Manager

Page 1: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager White Paper: Oracle Database Administration February 2012

Page 2: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

2

TABLE OF CONTENTS

INTRODUCTION ................................................................................................................. 3 Recovery Manager – New Functions ........................................................................................... 3 Recovery Manager – Restrictions ................................................................................................ 3 SAP Integration of the Recovery Manager .................................................................................. 4

BACKUP STRATEGIES ...................................................................................................... 5 Normal Backups ............................................................................................................................ 5 Full and Incremental Backups ..................................................................................................... 5 Incremental Backups after Changes to the Structure of the Database ..................................... 6 Restoring Incremental Backups .................................................................................................. 6

RMAN BACKUP WITH THE SAP BACKUP LIBRARY ...................................................... 8 Backing Up to Tape Devices ........................................................................................................ 8 Backing Up to Remote Disks ....................................................................................................... 9

RMAN BACKUP WITH AN EXTERNAL BACKUP LIBRARY .......................................... 10

INCREMENTAL BACKUP STRATEGY WITHOUT A BACKUP LIBRARY ...................... 12 RMAN Full Backup at Level 0 to Disk ........................................................................................ 12 Full Backup at Level 0 with BRBACKUP or an External Tool without RMAN ......................... 12 Incremental Backup at Level 1 to Disk with RMAN .................................................................. 13 Full Backup and Incremental Backup without Backup Library ............................................... 13 Stage 1: Full Backup at Level 0 ....................................................................................................................... 13 Stage 2: Incremental Backup at Level 1 .......................................................................................................... 14

VERIFICATION OF RMAN BACKUPS ............................................................................. 15

TECHNICAL INFORMATION ............................................................................................ 16 Save-Set Grouping ...................................................................................................................... 16 Tape Layout ................................................................................................................................. 17 Profile Parameters and BRBACKUP Command Options ......................................................... 18 Save-Set Grouping and Preparation Run ........................................................................................................ 18 RMAN Backup with the SAP Backup Library .................................................................................................. 18 RMAN Backup with an External Backup Library ............................................................................................. 18 RMAN Backups without a Backup Library ....................................................................................................... 19 Restoring Incremental Backups ....................................................................................................................... 19 Restoring Incremental Backups with Structural Changes ............................................................................... 20

ADDITIONAL INFORMATION .......................................................................................... 21 SAP Library ................................................................................................................................. 21 SAP Notes ................................................................................................................................... 21

Page 3: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

3

INTRODUCTION

The Oracle Recovery Manager (RMAN) is the standard Oracle backup and recovery tool. You can use it as a command line interface (CLI) or as a graphical user interface (GUI) within the Oracle Enterprise Manager (OEM). RMAN uses the System Backup to Tape (SBT) interface for backups to tape devices. This interface can be implemented by vendors of backup tools as a Dynamic Link Library (DLL), known as the backup library.

Recovery Manager with the Oracle SBT interface is delivered with the standard Oracle installation:

The SAP installation also delivers the following for use with RMAN:

SAP backup tools BRBACKUP, BRARCHIVE, BRRESTORE, and BRRECOVER

The SAP backup library

You have two options when you integrate RMAN into the Oracle with SAP installation: the SAP implementation or another third party implementation of the SBT interface. Starting with SAP Release 4.5, we supply the SAP implementation of the Oracle SBT interface – the SAP backup library. You must first install this before using it.

However, you can also choose other third-party backup libraries. The various solutions differ mainly in the type of backup media that they support, and in the characteristics of the backup programs.

Recovery Manager – New Functions

The version of RMAN delivered with Oracle lets you perform incremental backups. This means that you can improve your backup strategy by significantly reducing the amount of data to be backed up. As well as incremental backups, RMAN also offers other advantages:

Logical errors in database blocks are recognized automatically during the backup. This guarantees that each completed backup is consistent. This function can replace the weekly check with DBVERIFY.

Database blocks that are never used are not backed up, so reducing the number of blocks that have to be backed up.

You can verify backups to tape with the RMAN command VALIDATE or BACKUP VALIDATE.

The command BEGIN BACKUP /END BACKUP is not needed for online backups, since there is a block-

by-block check to see if the data is consistent. This significantly reduces the amount of redo log information.

Recovery Manager – Restrictions

You need to consider the following restrictions when you use RMAN directly with CLI or GUI in the Oracle Enterprise Manager:

RMAN can save information on backups into a recovery catalog. For security reasons, this catalog ought to be kept in a separate database on a separate host. This means more administrative work.

In a disaster situation – that is, loss of production database and recovery catalog – restore and recovery of data is complicated. You might have to contact Oracle Support. If the Recovery Manager does not have the administrative data stored in the recovery catalog and all control files are lost, it cannot recover the database using previous backups.

The Oracle Recovery Manager is not directly integrated in the SAP System.

The database user making the backups still requires SYSDBA authorizations. The SYSOPER

authorizations are not sufficient.

For more information on the Oracle Recovery Manager, see the Oracle documentation.

Page 4: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

4

SAP Integration of the Recovery Manager

By integrating the Oracle Recovery Manager (RMAN) with the SAP backup tools BRBACKUP, BRARCHIVE, and BRRESTORE, you can use the strengths of RMAN while avoiding the restrictions. The SAP solution uses only the most essential RMAN functions, at the same time providing security, flexibility, and integration with existing backup strategies and tools.

The SAP integration of the Oracle Recovery Manager gives you the following advantages:

The recovery catalog is not used. Information on the backups is saved in the control file, which is saved after each backup. When data is being restored, first the control file is copied back, and then the data files.

The integration of the RMAN into BRBACKUP and BRARCHIVE guarantees automatic integration into the Computing Center Management System (CCMS) in the SAP system.

If you use the SAP Backup Library, you can continue to use BRBACKUP and BRARCHIVE tape management in the same way as before.

You can continue to use an external BACKINT interface.

The user interface of BR*Tools remains unchanged except for some new options.

All previous SAP backup strategies can still be used with the RMAN, including standby database backups or split-mirror backups.

This white paper only covers RMAN calls with BR*Tools. This white paper does not cover native RMAN calls or calls with Oracle Enterprise Manager.

Page 5: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

5

BACKUP STRATEGIES

The decision on whether to use the Recovery Manager or not depends to a large extent on the strategy used to back up the data. The most suitable strategy depends on the size of the database, the daily amount of new or changed data, the backup media used, and your security requirements.

Normal Backups

Normal backups, that is whole or partial backups of the database using backup_mode =

all|<tablespace_list>|<object_list>, are normally performed with BRBACKUP or with an external

backup tool and the BACKINT interface. You can also perform these backups with the Recovery Manager and use all its advantages.

RMAN backups without backup library can be made locally to disk only. The entire backup to disk is done with the Oracle server process. The data on the disk is a one-to-one copy of the database files or as RMAN save sets. If you want to make a normal backup to a remote disk, you cannot use RMAN, except for incremental backups. Backups to tape devices using RMAN require a backup library that ensures tape administration, among other things.

Full and Incremental Backups

BRBACKUP supports incremental backups of the database with RMAN. The Oracle Recovery Manager offers two types of incremental backup: cumulative and differential. The integration of RMAN into BRBACKUP is restricted to cumulative incremental backups at level 1. This means that, in the event of a recovery, only one incremental backup at the most has to be applied. In contrast to a full backup, an incremental backup only backs up the changes that have been made since the last full backup. This significantly reduces the amount of backup data. Therefore, we recommend this strategy particularly for large databases.

An incremental backup requires an earlier full backup, that is, a level-0 backup. Note that the term “full backup” has a different meaning in the Oracle documentation. When RMAN backs up the database, it backs up all Oracle database blocks that have already been used. A subsequent incremental level-1 database backup backs up all Oracle database blocks that have changed since the last full backup. Changes to the whole database are taken into account.

You can only perform incremental backups at level 1 using RMAN. However, you can perform a full backup with BRBACKUP or with an external backup tool using BACKINT. In this case, BRBACKUP automatically catalogs the backup as a level-0 backup.

It can take almost the same time for the system to check whether a block has been used or changed as it takes to just back up the block. This means that you might not save much time by choosing an incremental backup.

You can only expect a significant reduction by choosing an incremental backup when the relatively low throughput of the tape devices is the reason for a long backup.

Oracle 10g feature “Block Change Tracking” solves this problem by separately tracking changed blocks. This means that the system only needs to read the changed blocks from disk, leading to faster processing. For more information, see SAP Note 964619.

Using the incremental backup strategy, we recommend you to set an expiration period for the tapes of at least 28 days, so that several generations of full backups are available. The offline redo log files must cover the period of time up to the oldest full backup – that is, both sets of tapes must have the same expiration period – and must also be backed up daily.

SAP offers the following options for implementing incremental backups:

Full backup (level 0)

Page 6: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

6

Full backup (level 0) with RMAN to:

A tape device with the SAP backup library

A local disk without a backup library

The supported media, with an external backup library

BRBACKUP backup, to local or remote tape devices or disks using cpio, dd, cp, copy, followed by

cataloging

Backup using an external tool and BACKINT, followed by cataloging

Incremental backup (level 1)

With RMAN to:

A tape device or remote disk with the SAP backup library

A local disk without backup library

The supported media, with an external backup library

One possible backup scenario is as follows:

Sundays: Full backup (level 0) of the database

Mondays to Saturdays: Incremental backup (level 1) of the database

The tools you choose depend on your specific requirements, such as backup media, the amount of data, and so on.

For more information, see “SAP Library” [Page 21].

Incremental Backups after Changes to the Structure of the Database

When the structure of the database changes during a backup cycle – for example, if a data file is added – the Oracle Recovery Manager might fail to complete the next incremental backup. However, if you integrate RMAN into BRBACKUP (with the SAP backup library or an external backup library), you can make incremental backups, even if the structure of the database has changed.

Save sets [page 16] are created each time an SBT backup library is used. Save sets are units that are created on the backup medium. Each save set contains one or more files (see the section “Technical Information” below).

During incremental backups, the changes are normally backed up in a single save set. If changes are made to the database structure during a backup cycle, then a second save set is created containing the backups of the new files.

In subsequent incremental backups during the cycle, any changes that are made to files that existed when the last full backup was made are saved in one save set. Any new files are saved in their entirety (not just the changes) in the other save set. This method has the advantage that you can be more specific about what you want to restore when restoring an incremental backup.

Restoring Incremental Backups

Any backups performed with RMAN must also be restored with RMAN, with the exception of backups to disk as a one-to-one copy of database files. In contrast to the BRRESTORE restore process without RMAN, which requires a closed database, restoring with RMAN requires the database to be mounted. The restore process for the incremental backup strategy consists of several steps.

The procedure for resetting the entire database to the status of an incremental backup, or to a point in time before a failure (that is, database reset, point-in-time recovery, disaster recovery) is as follows:

1. Precondition: The database is closed.

Page 7: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

7

If necessary, restore the control file (and the online redo log files for database reset using an offline backup) from the last incremental backup with BRRESTORE (without RMAN).

2. Precondition: The database is mounted.

Restore the full backup at level 0 (with RMAN)

Restore the last incremental backup (with RMAN) (possible reset point)

3. Precondition: The database is mounted.

Apply the offline redo log files to reset the data to the required point in time

If only some of the files are damaged (“partial restore and complete recovery”) – for example, due to a media error – it is sufficient to restore these files from the full backup, and afterwards restore the last incremental backup. RMAN automatically updates the changes made to the files, making sure that they have the same status as the incremental backup. The up-to-date status can be recovered by then importing the redo log files.

BRRECOVER supports a database reset to the state represented by an incremental backup. BRRECOVER supports a partial restore, followed by a recovery with incremental backups. Nevertheless, you can continue to recover data by applying offline redo log files, skipping the incremental backup if it is not available or lost.

Page 8: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

8

RMAN BACKUP WITH THE SAP BACKUP LIBRARY

The SAP backup library is an implementation of the Oracle interface System Backup to Tape (SBT) in the form of a Dynamic Link Library (DLL). This DLL is called by the Oracle server process to back up data, usually to tape. Without this library, the Oracle server process can only back up to local disks.

When you back up to tape, you must have an SBT backup library. Only then do you have the appropriate tape management available.

Backing Up to Tape Devices

BRBACKUP or BRARCHIVE calls the Recovery Manager (RMAN) when you back up to a tape device. If you want to use more than one device, there will be a call for each available device. RMAN activates the Oracle server process to read the data that you want to back up from the database files, and transfers it to the SAP backup library. The SAP backup library backs up the data directly to local or remote tape devices, or, as an alternative, uses the operating system command dd. Backing up without dd allows optimum streaming mode, while using dd makes you less dependent on tapes or device types.

Backup with the SAP Backup Library

SAP Backup Library

...

Oracle database

Oracle Server Process

BRARCHIVE /

BRBACKUP /

BRRESTORE

RMAN

dd

When you back up to remote tape devices, the SAP backup library sets up a network connection to the

remote host using a remote/secure shell and backs up the data to the remote devices using dd. We do not

recommend that you back up to remote tape devices for production systems, since errors can occur during the transmission of data across the network.

You have the following options for backup to tape devices: backup_dev_type = tape|tape_auto|tape_box|pipe|pipe_auto|pipe_box

Page 9: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

9

rman|rman_dd

+ SAP backup librarybackup_mode

tape_copy_cmd

all

ddcpio

X

full (level 0)

incr (level 1)

partial

X + cat

X

X + cat

X

X

X

X

X

X

Key:

X = backup possible

X + cat = backup followed by cataloging possible

Backing Up to Remote Disks

You can perform BRBACKUP backups to remote disks using the following profile parameters:

backup_dev_type = stage|stage_copy|stage_standby

However, with RMAN you can only perform incremental backups at level 1 to remote disks. To do this, the SAP-specific File Transfer Protocol (FTP) tool (SAPFTP) is used, as well as the SAP backup library. The full backup at level 0 needed for the incremental backup strategy is performed with BRBACKUP and then cataloged automatically.

You have the following options for backup to remote disks:

rcp / scp / ftp

RMAN + SAP backup librarybackup_mode

stage_copy_cmd

all

ftprcp

/scp

X

full (level 0)

incr (level 1)

partial

X + cat

X

X + cat

X + SAPFTP

X

X

Key:

X = backup possible

X + cat = backup followed by cataloging possible

X + SAPFTP = backup with SAPFTP tool possible

Page 10: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

10

RMAN BACKUP WITH AN EXTERNAL BACKUP LIBRARY

You can back up the database using external backup software and RMAN. In order to back up data to tape, you need a third-party implementation of the Oracle SBT interface as a dynamic link library. The type of backup media used depends on the external backup tool and the corresponding backup library of the external vendor.

Backup with an External Backup Library

Oracle Database

Backup

Server

BRARCHIVE/

BRBACKUP/

BRRESTORE

External Backup Library

Backup Client

Oracle Server ProcessRMAN

Backup tool

- not under

BRBACKUP control

Control file

Profiles

Logs

...

Remote

disk

Local

disk

BACKINT

Backup Client

Phase 1

Phase 3

Phase 2

A database backup with an external backup library consists of the following phases:

1. BRBACKUP calls the Oracle RMAN and starts the Oracle server process. The Oracle server process reads the data that you want to back up from the database files, and transfers it to the external backup library. This functions as a backup client and transfers the data to the backup server, which in turn backs up the data to the storage medium.

2. BRBACKUP copies the control file, the initialization profiles, and the log files to local or remote disk or transfers them to the backup client using the BACKINT interface. The backup client transfers the data to the backup server, which in turn backs up the data to the storage medium. This control file contains information on the backup of the files from the first phase.

You have the following options for backup with external software:

Page 11: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

11

rman_disk

rman_stage

with RMAN and

external SBT

backup librarybackup_mode

backup_dev_type

all

util_file

without RMAN

full (level 0)

incr (level 1)

partial

X + cat

X + BACKINT

X

X

Key:

X = backup possible

X + cat. = backup followed by cataloging possible

X + BACKINT = backup followed by BACKINT backup of profiles, logs, and control files

possible

rman_util

with RMAN and

external SBT

backup library

X

X

X

X

X + BACKINT

X + BACKINT

X + BACKINT

You can continue to back up the database using external backup tools and the BACKINT interface

(backup_dev_type = util_file). If a full backup is then cataloged, you can use it as a reference

backup for an incremental backup strategy.

You cannot make incremental backups at level 1 without RMAN, even if you use an external backup tool. RMAN can back up database files only: it cannot back up profiles or logs. BRBACKUP backs up the profiles, logs, and the control file in a second phase to local or remote disk or with the BACKINT interface.

To avoid using BACKINT, you can perform backups with external backup libraries in the second phase, using the following parameter:

backup_dev_type = rman_disk|rman_stage

In this case, the control file, profile and log files are copied to a local or remote disk. You can use native operating system or external backup tools to transfer the files to the final backup medium. You can find more information in SAP Note 420698.

Page 12: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

12

INCREMENTAL BACKUP STRATEGY WITHOUT A BACKUP LIBRARY

You always have to use RMAN to perform an incremental backup at level 1. However, you can perform a full backup at level 0 without RMAN, using instead native BRBACKUP (cpio, dd, cp, rcp, scp, ftp) or an external backup tool. In this case, the full backup is automatically cataloged as a level-0 backup.

RMAN Full Backup at Level 0 to Disk

A full backup with RMAN and without the backup library can be made to a local disk only. You must then use BRBACKUP to back up the disk backup to tape. This is a two-step backup strategy.

Advantages:

You can use RMAN functions (for example, automatic block checks)

There is a reduction in redo information in an online full backup, since RMAN checks whether the data is consistent at the block level. This means that the commands BEGIN/ END BACKUP do not need to be executed.

Disadvantage:

In the second step you have to additionally copy the full backup from disk to tape. This is extra work.

Settings:

backup_mode = full backup_dev_type = disk

disk_copy_cmd = rman|rman_set

Full Backup at Level 0 with BRBACKUP or an External Tool without RMAN

You can make a full backup at level 0 with or without RMAN. After you have made the full backup either with native BRBACKUP (cpio, dd, cp, rcp, scp, ftp) or with an external tool (using BACKINT), it is cataloged as a level-0 backup. You can use BRBACKUP to make a full backup directly to tape. This removes the need for a two-step backup.

Advantages:

There is additional security when you restore or recover the backup. You can also recover the database without RMAN, since no save sets are created during the full backup at level 0. In this case, the import of the redo log files created since the last backup replaces the restore of the last incremental backup.

Under certain conditions the backup can be quicker, since RMAN is not involved in the full level-0 backup. The data is backed up directly, using cpio, dd, cp, rcp, scp, ftp, or BACKINT.

Disadvantages:

You cannot take advantage of RMAN features such as database block checks during the full backup.

The commands BEGIN / END BACKUP are used during the online full backup, leading to extra redo log files. During the process of backing up and deleting these extra redo log files, the danger of an archiver stuck exists.

If you recover data without RMAN, you might have to apply a large number of redo log files, since the full backup is usually performed only once a week.

Settings:

backup_mode = full backup_dev_type = tape|pipe|disk|stage|util_file

tape_copy_cmd = cpio|dd

Page 13: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

13

disk_copy_cmd = cp

stage_copycmd = rcp|scp|ftp

Incremental Backup at Level 1 to Disk with RMAN

You can also perform incremental backups at level 1 with RMAN and without a backup library, but only to disk. This is not a one-to-one copy of the database. Instead, save sets are created. This means that you can recover a data file from an incremental backup only with RMAN. In the second step of an incremental backup with RMAN, you must back up the backup to tape with BRBACKUP. Therefore, this is a two-step backup.

Settings:

backup_mode = incr backup_dev_type = disk

For more information on creating save sets, see “Save-Set Grouping” [page 16] below.

Full Backup and Incremental Backup without Backup Library

There are two stages in an incremental backup strategy without backup library: a full backup at level 0 and an incremental backup at level 1.

Stage 1: Full Backup at Level 0

As shown in the graphic below, the full backup consists of the following phases:

1. BRBACKUP calls cpio, dd, or the BACKINT program to back up the database. cpio or dd reads the data from disk and saves it to tape. The BACKINT interface transfers the data files to the backup software of an external vendor. The data files are then backed up to the backup medium.

2. RMAN catalogs the backup automatically as a full backup at level 0, which serves as the basis for any future incremental backups.

Full Backup at Level 0 without Backup Library

Page 14: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

14

Settings:

backup_mode = full backup_dev_type = tape|pipe|util_file

tape_copy_cmd = cpio|dd

Stage 2: Incremental Backup at Level 1

The incremental backup has to be performed as a two-step backup, as shown in the graphic below, since it cannot be performed directly to tape:

1. The Oracle server process reads the data from the Oracle database and backs it up to disk in a save set.

2. In a separate run, BRBACKUP calls cpio, dd, or the BACKINT program to read the incremental save set from disk and write it to the backup medium. The BACKINT interface transfers the data to the backup server are of an external vendor. The data is then backed up to the backup medium.

Incremental Backup at Level 1 without Backup Library

Settings:

Step 1

backup_mode = incr backup_dev_type = disk

Step 2

backup_mode = incr backup_dev_type = tape|pipe|util_file

tape_copy_cmd = cpio|dd

BRBACKUP option –b is set.

An incremental backup strategy without a backup library, in which the full backup at level 0 is performed without RMAN, is a temporary or even long-term alternative to the complete RMAN solution.

Page 15: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

15

VERIFICATION OF RMAN BACKUPS

The BRBACKUP, BRARCHIVE, and BRRESTORE functions for verifying backups continue to be supported

for RMAN backups. RMAN validates save sets with the VALIDATE or BACKUP VALIDATE command. The

procedure is as follows:

1. The save sets are read from the backup medium, during which the legibility of the backup is checked.

2. RMAN checks the internal data consistency of the save sets. There is no one-to-one comparison with the originals at the binary level.

You can immediately verify online or offline RMAN backups with BRBACKUP or RMAN backups of offline redo logs with BRARCHIVE. You can verify after a delay with BRRESTORE on the database host only (precondition: the database is mounted or open).

You can even use RMAN to verify database and offline redo log backups performed without RMAN (option –

w use_rmv|first_rmv) or to validate directly database or offline redo log files without starting a backup

(option –w only_rmv).

Verification with Oracle DBVERIFY is not supported for RMAN backups with save sets, since DBVERIFY cannot interpret the save set contents. We still recommend that you verify backups as often as before, ideally once a week and at least once in each tape management cycle.

Page 16: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

16

TECHNICAL INFORMATION

Save-Set Grouping

When the SAP backup library is used, the grouping of several data files into save sets helps to optimize the load on fast tape drives. This is called file multiplexing and it allows the tape drives to work with maximum data throughput in streaming mode. You can define the number of files in each save set with the profile

parameter saveset_members or the BRBACKUP command option -s|-savesets.

As shown in the graphic below, the SAP backup library performs a preparation run (backup_dev_type =

rman_prep) to determine the optimal save-set distribution of the data files that you want to back up:

1. The expected compression rates of the save sets are estimated by determining the decompressed and compressed save set sizes with BRTOOLS.

2. BRBACKUP creates save sets and stores the information on the composition of the save sets and the compression rates for future database backup runs.

Save-Set Grouping

Phase 2

A save set can contain individual data files, all files of a tablespace, or the complete database backup. The size of the save sets must be selected according to the tape device. Fast data flow with a minimum save set size is the optimum. We do not recommend large save sets, since in a restore the complete save set has to be read, even if only one data file has to be restored.

During an incremental backup with the SAP backup library, saveset_members = all is set as default.

This means that a single incremental save set is created containing all modified database blocks. When backing up to disks, you can divide this save set into pieces, to avoid exceeding certain size limits, such as the 2 GB limit.

Page 17: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

17

BRBACKUP 7.20 is capable of performing an incremental disk backup to several save sets in parallel. For more information, see SAP Note 1493614.

For BRACHIVE backups with RMAN, each save set always contains only one offline redo log file. SAP

recommends that you perform the preparation run once a month – by using brbackup –d rman_prep –

and each time that major changes have been made to the database, for example, after a reorganization, an SAP release change, database upgrade, or mass data transfer. After a tablespace extension, it is sufficient to execute the run only for the newly created files.

Do not start the preparation run when using an external backup library.

Tape Layout

The tape layout with RMAN is basically the same as for the previous backup methods without RMAN. This means that you do not have to reinitialize the tapes if you are using the SAP implementation of the SBT interface (that is, the SAP backup library).

BRBACKUP uses cpio to back up the tape administration information (that is, the tape label) and the

initialization files init<DBSID>.ora or spfile<DBSID>.ora and init<DBSID>.sap to tape, as follows:

1. The SAP backup library backs up the save sets to tape directly or using dd.

2. BRBACKUP uses cpio or dd to back up the control file and cpio to back up the log files to tape.

Tape Layout

sum_log.tape.hdr0

... Oracle Database

SAP Backup Library

Oracle Server ProcessRMAN

cpio/

dd

cpio

init_sap det_loginit_ora control file space_logsaveset-nsaveset-2saveset-1

BRBACKUP/

BRRESTORE

dd

Phase 3

Phase 1

Phase 2

cpio

Page 18: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

18

Profile Parameters and BRBACKUP Command Options

Save-Set Grouping and Preparation Run

To set the size of the save sets by defining the number of files in each save set, you need to make the

following entry in the initialization file init<DBSID>.sap:

saveset_members = 1|2|3|4|tsp|all (Default: 1)

The corresponding BRBACKUP command option is -s|-savesets

You can start the preparation run for determining the optimal distribution of files in the save sets in the following way at the command line:

brbackup –u / –d rman_prep

RMAN Backup with the SAP Backup Library

When you make backups with the SAP backup library, you need to make the following entries in the

initialization file init<DBSID>.sap, or use the corresponding command options:

To local tape devices

backup_dev_type = tape|tape_auto|tape_box

tape_copy_cmd = rman|rman_dd

To remote tape devices

backup_dev_type = pipe|pipe_auto|pipe_box

tape_copy_cmd = rman|rman_dd

To remote disk (incremental)

backup_mode = incr

backup_dev_type = stage|stage_copy|stage_standby

remote_user = "<user_name> [<password>]" (precondition for SAPFTP)

remote_host = <host_name> (precondition for SAPFTP)

RMAN Backup with an External Backup Library

When you make backups with external backup libraries, you need to make the following entries in the initialization file init<DBSID>.sap, or use the corresponding command options:

backup_dev_type = rman_util|rman_disk|rman_stage

There are other parameters that BRBACKUP passes (without the prefix rman_ ) directly to the Oracle

RMAN, and these can be set optionally. They influence the way that save sets are created and the parallel backup to different media.

rman_channels

This is the number of channels used for parallel processing

rman_filesperset

This controls the number of files in each save set; the default 0 means either for normal backups one file in each save set, or for incremental backups all files in one save set. Figures between 1 and m actually refer to the numbers of files.

rman_maxopenfile

rman_maxsetsize

rman_maxpiecesize

rman_maxsectionsize

Page 19: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

19

rman_maxcorrupt

rman_compress

rman_rate

rman_diskratio

rman_duration

rman_keep

rman_cross_check

rman_pool

rman_copies

rman_proxy

rman_parms

rman_send

For more information on these parameters, see the “SAP Library” [Page 21] and the Oracle backup and recovery documentation.

RMAN Backups without a Backup Library

When you make normal backups to disk with RMAN, you need to make the following entries in the

initialization file init<DBSID>.sap, or use the corresponding command options:

backup_dev_type = disk

disk_copy_cmd = rman|rman_set

The command-line calls for the individual steps of the incremental backup strategy are as follows:

1. Full backup at level 0 without RMAN:

brbackup –m full –d tape|pipe|stage|util_file|util_file_online

tape_copy_cmd = cpio|dd

2. Incremental backup at level 1 to disk with RMAN:

brbackup –m incr –d disk

3. Backup of the incremental backup to tape without RMAN (two-step backup):

brbackup –b last –m incr –d tape|pipe|stage|util_file

Restoring Incremental Backups

To restore the database to a consistent and up-to-date state, for example after a media error, you can use the following BRRESTORE command options (RMAN ensures that the changes are made to the affected files):

1. If necessary, restore the control file and optionally online redo log files from the last incremental backup:

brrestore -b last –m 0[,00]

2. Restore a full backup at level 0:

brrestore -b <brb_log_name> –m all|<object_list>

3. Restore the last incremental backup at level 1:

brrestore -b last –m incr

4. Restore the offline redo log files:

brrestore –a <n1>-<n2>

5. Apply the offline redo log files with the Oracle Server Manager.

Page 20: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

20

Normally BRRECOVER automatically performs these steps during the appropriate recovery procedure. We recommend you to use it.

Restoring Incremental Backups with Structural Changes

After you make an incremental backup with structural changes, the new files are saved in their entirety to a second save set when you make any subsequent incremental backups. The following save sets are created when you use the SAP backup library:

<coded timestamp>.INCR (changes to the “old” files)

<coded timestamp>.FULL (new files)

Backing up the new files to a separate save set lets you specify precisely which files are to be restored:

Restore the changes to all files that existed in the database at the time of the last full backup at level 0 (that is, the first save set of the last incremental backup):

brrestore -b last -m incr_only

Restore the files that were added since the last full backup at level 0 (that is, the second save set of the last incremental backup):

brrestore -b last -m incr_full

Restore the complete incremental backup and, if they exist, both save sets:

brrestore -b last -m incr

Page 21: BR*Tools with Oracle Recovery Manager

BR*Tools with Oracle Recovery Manager February 2012

21

ADDITIONAL INFORMATION

See also the Oracle backup and recovery documentation, which you can find at www.oracle.com.

SAP Library

You can find more information on Oracle database administration and the contents of this document in the SAP Library as follows:

All paths refer to SAP NetWeaver 7.3.

1. Call up the SAP Help Portal at help.sap.com/nw73 Application Help SAP Library: English.

2. Choose SAP NetWeaver Library: Function-Oriented View Database Administration Database Administration for Oracle.

3. Choose one of the following:

a) SAP Database Guide: Oracle Other Tools for Oracle DBA Oracle Recovery Manager (RMAN)

b) CCMS: Oracle

You can also find these plus selected extracts from the SAP Library at:

www.sdn.sap.com/irj/sdn/ora SAP on Oracle Knowledge Center SAP

Documentation in Help Portal

SAP Notes

You can find SAP Notes at:

service.sap.com/notes

Page 22: BR*Tools with Oracle Recovery Manager

www.sap.com

© Copyright 2012 SAP AG. All rights reserved

No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice.

Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors.

Microsoft, Windows, Excel, Outlook, PowerPoint, Silverlight, and Visual Studio are registered trademarks of Microsoft Corporation.

IBM, DB2, DB2 Universal Database, System i, System i5, System p, System p5, System x, System z, System z10, z10, z/VM, z/OS, OS/390, zEnterprise, PowerVM, Power Architecture, Power Systems, POWER7, POWER6+, POWER6, POWER, PowerHA, pureScale, PowerPC, BladeCenter, System Storage, Storwize, XIV, GPFS, HACMP, RETAIN, DB2 Connect, RACF, Redbooks, OS/2, AIX, Intelligent Miner, WebSphere, Tivoli, Informix, and Smarter Planet are trademarks or registered trademarks of IBM Corporation.

Linux is the registered trademark of Linus Torvalds in the United States and other countries.

Adobe, the Adobe logo, Acrobat, PostScript, and Reader are trademarks or registered trademarks of Adobe Systems Incorporated in the United States and other countries.

Oracle and Java are registered trademarks of Oracle and its affiliates.

UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group.

Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems Inc.

HTML, XML, XHTML, and W3C are trademarks or registered trademarks of W3C®, World Wide Web Consortium, Massachusetts Institute of Technology.

Apple, App Store, iBooks, iPad, iPhone, iPhoto, iPod, iTunes, Multi-Touch, Objective-C, Retina, Safari, Siri, and Xcode are trademarks or registered trademarks of Apple Inc.

IOS is a registered trademark of Cisco Systems Inc.

RIM, BlackBerry, BBM, BlackBerry Curve, BlackBerry Bold, BlackBerry Pearl, BlackBerry Torch, BlackBerry Storm, BlackBerry Storm2, BlackBerry PlayBook, and BlackBerry App World are trademarks or registered trademarks of Research in Motion Limited.

Google App Engine, Google Apps, Google Checkout, Google Data API, Google Maps, Google Mobile Ads, Google Mobile Updater, Google Mobile, Google Store, Google Sync, Google Updater, Google Voice, Google Mail, Gmail, YouTube, Dalvik and Android are trademarks or registered trademarks of Google Inc.

INTERMEC is a registered trademark of Intermec Technologies Corporation.

Wi-Fi is a registered trademark of Wi-Fi Alliance.

Bluetooth is a registered trademark of Bluetooth SIG Inc.

Motorola is a registered trademark of Motorola Trademark Holdings LLC.

Computop is a registered trademark of Computop Wirtschaftsinformatik GmbH.

SAP, R/3, SAP NetWeaver, Duet, PartnerEdge, ByDesign, SAP BusinessObjects Explorer, StreamWork, SAP HANA, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and other countries.

Business Objects and the Business Objects logo, BusinessObjects, Crystal Reports, Crystal Decisions, Web Intelligence, Xcelsius, and other Business Objects products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Business Objects Software Ltd. Business Objects is an SAP company.

Sybase and Adaptive Server, iAnywhere, Sybase 365, SQL Anywhere, and other Sybase products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of Sybase Inc. Sybase is an SAP company.

Crossgate, m@gic EDDY, B2B 360°, and B2B 360° Services are registered trademarks of Crossgate AG in Germany and other countries. Crossgate is an SAP company.

All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.