BR*Tools SAP Oracle Backups

Table of Contents

Full Backups

You can perform a full backup by using the BRBACKUP command with the UTIL_FILE or RMAN_UTIL interface. The database can be online or offline.

A full backup is the most comprehensive backup and is the baseline for incremental backups.

Before You Begin

  1. Add the CVInstanceName and CVClientName parameters to one of the following files:

    For UNIX configurations, the init<SID>.utl file is under the $ORACLE_HOME/dbs directory.

    For Windows configurations, the init<SID>.utl file is under the $ORACLE_HOME\database directory.

  2. On Windows configurations, include this information and then run the BRBACKUP command with the –r option.
  3. If you use the SAP Util file interface, modify the init<SID>.utl file. For details on the parameters, see Supported SAP Oracle Util File Parameters.

About This Task

The command line syntax is below.

brbackup -t [offline|online] -d [util_file|rman_util|util_file_online] -m [full|incr]

For information on the BRBACKUP command options, go to the SAP Help website, Command Options for BRBACKUP.

Before You Begin

Note: If you use SAP Secure Store, replace the slash ("/") with a double slash ("//") in all examples.

Procedure

UTIL_FILE Interface

  • On the command line, type the following command.

    brbackup -t online -d util_file -m all -u /

Expand All

UTIL_FILE_ONLINE Interface

  • On the command line, type the following command.

    brbackup -t online -d util_file_online -m all -u /

Expand All

RMAN_UTIL Interface

  • On the command line, type the following command.

    brbackup -t online -d rman_util -m FULL -u /

Incremental Backups

Perform an incremental backup by using the BRBACKUP command with the RMAN_UTIL interface.

An incremental backup contains the changed data from the last full backup. Incremental backups use less media and resources than full backups.

For more information on incremental backups, see Incremental Backups.

Before You Begin

  1. Add the CVInstanceName and CVClientName parameters to one of the following files:

    For UNIX configurations, the init<SID>.utl file is under the $ORACLE_HOME/dbs directory.

    For Windows configurations, the init<SID>.utl file is under the $ORACLE_HOME\database directory.

  2. On Windows configurations, include this information and then run the BRBACKUP command with the –r option.
  3. If you use the SAP Util file interface, modify the init<SID>.utl file. For details on the parameters, see Supported SAP Oracle Util File Parameters.
  4. Note: If you use SAP Secure Store, replace the slash ("/") with a double slash ("//") in all examples.

Procedure

  • On the command line, type the following command.

    brbackup -t online -d rman_util -m incr -u /

Archive Log Backups

Perform an archive log backup by using the BRARCHIVE command.

You can use archive log backups to recover database transactions that have been lost due to an operating system or disk failure. Apply the archive logs to an online backup to recover a database.

By default, full backups include both data and archive logs, but you can also perform separate archive log backups.

Best Practice: Schedule an Oracle archive log backup every 20 minutes on busy databases.

Before You Begin

  1. Add the CVInstanceName and CVClientName parameters to one of the following files:

    For UNIX configurations, the init<SID>.utl file is under the $ORACLE_HOME/dbs directory.

    For Windows configurations, the init<SID>.utl file is under the $ORACLE_HOME\database directory.

  2. On Windows configurations, include this information and then run the BRBACKUP command with the –r option.
  3. If you use the SAP Util file interface, modify the init<SID>.utl file. For details on the parameters, see Supported SAP Oracle Util File Parameters.

About This Task

The command line syntax is below.

brarchive -d [util_file|rman_util|util_file_online] -s| -sc|-ds

For information on the BRBACKUP command options, go to the SAP Help website, Command Options for BRARCHIVE.

Procedure

Expand All

UTIL_FILE Interface

  • On the command line, type one of the following commands.

    Backup Logs, Save and then Delete the Logs

    brarchive -sd -b -m all -d util_file -c

    Archive Offline Redo Logs

    brarchive -d util_file -s

    Create a Secondary Copy of the Archived Offline Redo logs

    brarchive -d util_file -sc

    Archive the Offline Redo Logs to 2 Backup Tape Devices in Parallel

    brarchive -d util_file -ss

    Delete the Archive Offline Redo After the Archive

    brarchive -d util_file -sd

    Create a Second Copy of the Archived Offline Redo Log Files and then Delete the Files

    brarchive -d util_file -scd

    Delete Archived Offline Redo Logs

    brarchive -d util_file -ds

    Create a Second Copy of the Archived Offline Redo Log Files and then Delete the Files

    brarchive -d util_file -scd

    Archive the Offline Redo Logs of 2 Backups on Tape Devices in Parallel and the Delete the Files

    brarchive -d util_file -ssd

    Create a Second Copy of the Archived Offline Redo Logs and then Archive the New Offline Redo Logs

    brarchive -d util_file -cs

    Create a Second Copy of the Archived Offline Redo Logs and then Archive the New Offline Redo Logs

    brarchive -d util_file -cds

    Delete Offline Redo Logs that Have Been Copied Twice

    brarchive -d util_file -dc

Expand All

RMAN_UTIL Interface

  • On the command line, type the following command:

    brarchive -d rman_util -s

Selective Online Full Backup

You perform a selective online full backup when the database is online. A selective copy subclient includes the data, logs and control file. The advantage of a selective online full backup is that the data and logs use the same storage policy, which means that they reside on the same media and are self-contained for long-term archiving. You can use this in a disaster recovery, because you do not need to locate different media from multiple jobs to recover the database.

For more information on selective online full backups, see Selective Online Full Backups.

You must set the SelectiveOnlineFull parameter in the SAP for Oracle Util file in order to use this feature.

If the datatype is online, when you run a brbackup job and another brarchive job for the log backup runs without issues, the data job type is marked as 'Online Full' and the job is eligible for selective copy.

Procedure

Expand All

UTIL_FILE

  • Include the SelectiveOnlineFull parameter in the $ORACLE_HOME/dbs/init<SID>.utl file and set the parameter value to 1.

    For information on this parameter, see Supported SAP for Oracle Util File Parameters

    Example

    numstreams
    1
    SelectiveOnlineFull
    1

If the datatype is online:

  1. On the command line, type the following command to run the data backup if the data type is online.

    brbackup -t online -d util_file -m all -c force -u /

  2. On the command line, type the following command to run the log backup.

    brarchive –d util_file –s –c force -u /

  1. On the command line, type the following command to run the data backup if the data type is online_cons.

    brbackup -t online_cons -d util_file -m all -c force -u /

  2. On the command line, type the following command to run the log backup.

    brarchive -d util_file -s -c force

    If the brbackup job followed by a brarchive job complete without any issues, the data job type is marked as 'Online Full" and the job is eligible for selective copy.

RMAN_UTIL

  • Include the SelectiveOnlineFull parameter in the $ORACLE_HOME/dbs/init<SID>.sap file and set the parameter value to 1.

    Example

    RMAN_PARMS="SBT_LIBRARY= /Base/libobk.so,BLKSIZE=1048576,ENV=(CvClientName= client_name,CvInstanceName= instance_name,SelectiveOnlineFull=1)

If the datatype is online:

  1. On the command line, type the following command to run the data backup if the data type is online.

    brbackup -t online -d rman_util -m FULL -c force -u /

  2. On the command line, type the following command to run the log backup.

    brarchive -d rman_util -s -c force

  1. On the command line, type the following command to run the data backup if the data type is online_cons..

    brbackup -t online_cons -d rman_util -m FULL -c force -u /

  2. On the command line, type the following command to run the log backup.

    brarchive -d rman_util -s -c force

    If the brbackup job followed by a brarchive job complete without any issues, the data job type is marked as 'Online Full" and the job is eligible for selective copy.

Consistent Online Backups

Use a consistent online backup to take backups without shutting down the database.

In a consistent online backup, the database files and the offline redo log files are on the same backup volume.

Note: The backed up offline redo logs are independent from the BRARCHIVE log backups.

Before You Begin

  • Edit the init<SID>.utl file and add the CvinstanceName and CVClientName parameters. Use the source host values for these parameters.

    CvInstanceName
    Instance001
    CvClientName
    client1

Procedure

Expand All

UTIL_FILE Interface

  • On the command line, type the following command:

    brbackup -t online_cons -d util_file -m full

Expand All

RMAN_UTIL Interface

  • On the command line, type the following command:

    brbackup -t online_cons -d rman_util -m full

Standby Database Backup

Set up a standby database as a copy of the primary (production) database and use it for full system recovery (disaster recover) and data corruption.

You can back up standby databases when they are either in an offline or online state.

When the database in online, the SAP for Oracle Agent determines the standby database mode by checking the database role and automatically disables the log switch operation.

The following table describes the supported device types for standby database backups.

Backup Type Supported Device Types
Traditional online RMAN_UTIL
Traditional offline RMAN_UTIL

UTIL_FILE

UTIL_FILE_ONLINE

SnapProtect offline Not Supported
SnapProtect online UTIL_FILE

UTIL_VOL_ONLINE

UTIL_VOL

Procedure

Expand All

UTIL_FILE Interface

  • On the command line, type one of the following commands.

    Backup offline standby database by using brbackup

    brbackup –t offline_standby –d util_file –m all

    Backup online standby database by using brarchive

    brarchive -d util_file -t standby -cds

RMAN_UTIL Interface

  • On the command line, type one of the following commands.

    Backup online standby database by using brbackup

    brbackup –t online_standby –d rman_util –m all

    Backup offline standby database by using brbackup

    brbackup –t offline_standby –d rman_util –m all

    Backup online standby database by using brarchive

    brarchive -d rman_util -t standby -cds

Offline Redo Logs Backups Using BRARCHIVE -f | Fill Option

You can back up offline redo log files by using the BRARCHIVE tool with the fill option.

Backups are automatically triggered, based on the number of generated logs.

The SAP Agent extends command line support to the BRARCHIVE tool with the fill option for both the RMAN and BACKINT device types.

Before You Begin

  1. Create the init<SID>.sap and init<SID>.utl files.
  2. To back up, save and delete the archive logs by default, add the following parameter to the init<SID>.sap

    archive_function = save_delete

  3. Optional: To avoid multiple job IDs in the same BRARCHIVE session, set the nSINGLEJOBMERGETIMEOUT additional setting. For more information, see Setting the SAP Oracle Job ID Timeout.

About This Task

Synopsis

brarchive –f [number_logs|stop] -d [device_type]

Option Description
-f To start the archiving process, specify the number of logs (number_logs) to complete. To stop archiving, issue the command by using the stop parameter.
-d The device where the offline redo log files are archived.

Run the brachive -f num_logs to start the backup process.

If you run the brachive -f num_logs command and do not specify any parameters, the logs are backed up and saved.

When you use the brachive -f feature, SnapProtect third party command line jobs are marked as completed with one or more errors when the user specified number of logs are not generated in default timeout period of 6 minutes for the ClDBControlAgent. You can increase the timeout by setting the sSINGLEJOBMERGETIMEOUT additional setting. For more information, see Setting the SAP Oracle Job ID Timeout.

Restore the offline redo log files by using Third Party Command Line Restores, because the SnapProtect software log backup jobs without the config phase are marked as Completed With Errors, and are not available in the CommCell Console browse functionality.

Note: Stop the BRARCHIVE tool before you start a log restore. This ensures that the configuration phase backup is complete.

Note: Do not use BRARCHIVE with SnapProtect, because it can exceed the filer snapshot reserve. Set the snapBackup parameter in the SAP Oracle init<SID>.utl file to 0 for log backups.

Procedure

Note: If you use SAP Secure Store, replace the slash ("/") with a double slash ("//") in all examples.

  1. On the SAP for Oracle host, start the archive.

    On the command line, type one of the following commands, substituting the number_logs variable

    BRARCHIVE waits until that number of files are created, and then moves then to the specified devices. This process repeats until you run brachive -f stop command.

    Expand All

    Back Up the Specified Number of Logs

    brarchive –f number_logs -u /

    Expand All

    Back Up, Save, and Delete the Specified Number of Logs

    brarchive –f number_logs –sd –u /

  2. On the SAP for Oracle host, stop the archive that is currently running. On the command line,type the following command.

    BRARCHIVE stops the archive process and invokes the config phase of the backup.

    brarchive –f stop

BACKINT Interface

Before You Begin

  • Edit the init<SID>.utl file and add:

    CvInstanceName
    Instance001
    CvClientName
    client1

About This Task

BACKINT  uses the SAP BRTools to communicate with the SAP Oracle Database and perform backup and restore operations. You can iinquire about backup requests and executes them.

backint -u <user_id> [-f <function>] [-t <type>] [-p <par_file>] [-i <in_file>] [-o <out_file>] [-c]

Option Description
-u The BACKINT user ID. This will be the database instance name (ORACLE_SID)
-f The operation (backup, restore, or inquire). The default is backup.
-t The backup type: file or file_online. The default is file.
-p The backup utility parameter file containing the parameters that determine the backup procedure specific to the backup utility. SAP BRtools specifies the location of this utility parameter file in the parameter file (parameter util_par_file), but does not evaluate its contents.
-i The input file (text file) that defines the files and directories to be backed up. The default is standard input.
-o The output text file that will contain the processing messages and the results of the operation. The default is the standard output.
-c The mode: attended or unattended mode (does not involve user interaction). The default is attended.

Procedure

Backup Example

Use the following example, substituting the SID, input_text_fil and output_file variables.

backint -u SID -f backup -t file –p /oracle/SID/dbs/initSID.utl -i input_text_file -o output_file

Expand All

Output

Program: backint
Parameters: Client node: RC1
Function: backup
Input File: input_text_file
Output File: output_file
Profile: /oracle/SID/dbs/initC11.utl
Parallel sessions: 1 BKI0008I: Number of bytes to save: 0.012 MB.
Backup started ... #SAVED SAP___9409020458 /oracle/SID/sapdata1/user1i_1/user1i.data1
BKI0022I: Bytes saved so far: 0.012 MB (100.0%).

Inquire a Backup Request

To get a list of all the backup jobs that contain a specified file name, use a # in front of the file name.

#NULL /oracle/SID/sapdata1/user1i_1/user1i.data1

Example

Use the following example, substituting the SID, input_text_fil and output_file variables.

Program: backint
Parameters: Client node:
RC1 Function: backup
Input File: input_text_file
Output File: output_file
Profile: /oracle/CER/dbs/initCER.utl
Parallel sessions: 1
#BACKUP SAP___9409020458 /oracle/SID/sapdata1/user1i_1/user1i.data1
#BACKUP SAP___9409020450 /oracle/SID/sapdata1/user1i_1/user1i.data1

BR*Tools Interface

You can also use the BR*Tools user interface to perform backup and restore operations.

For information on the BR*Tools, go to the SAP Help website, BR*Tools User Interface.

Before You Begin

  • Edit the init<SID>.utl file and add the

    CvInstanceName
    Instance001
    CvClientName
    client1

Procedure

A sample BR*Tools backup operation is shown.

  1. From the BR*Tools interface main menu, select the Backup and Database option (in the example, 4).

    BR*Tools main menu\par
    \par
    1 = Instance management\par
    2 - Space management\par
    3 - Segment management\par
    4 - Backup and database copy\par
    5 - Restore and recovery\par
    6 - Check and verification\par
    7 - Database statistics\par
    8 - Additional functions\par
    9 - Exit program\par
    \par
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help\par
    -----------------------------------------------------------\par
    BR0662I Enter your choice:\par

  2. From the BR*Tools choice menu, select the database backup option (in the example, 1).

    BR0656I Choice menu 9 - please make a selection\par
    -------------------------------------------------------------------------------\par
    Backup and database copy\par
    \par
    1 = Database backup\par
    2 - Archivelog backup\par
    3 - Database copy\par
    4 - Non-database backup\par
    5 - Backup of database disk backup\par
    6 - Verification of database backup\par
    7 - Verification of archivelog backup\par
    8 - Additional functions\par
    9 - Reset program status\par
    \par
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help\par
    -----------------------------------------------------------\par
    \b BR0662I Enter your choice:\b0\par

  3. From the BR*Tools input menu, select options to specify the backup input values (for example 2 to specify the device type).

    BR0657I Input menu 15 - please check/enter input values\par
    -------------------------------------------------------------------------------\par
    BRBACKUP main options for backup and database copy\par
    \par
    1 - BRBACKUP profile (profile) ....... [initCER.sap]\par
    2 - Backup device type (device) ...... [util_file]\par
    3 # Tape volumes for backup (volume) . []\par
    4 ~ BACKINT/Mount profile (parfile) .. [?/dbs/init@.utl]\par
    5 - Database user/password (user) .... [/]\par
    6 - Backup type (type) ............... [offline_force]\par
    7 - Disk backup for backup (backup) .. [no]\par
    8 # Delete disk backup (delete) ...... [no]\par
    9 ~ Files for backup (mode) .......... [all]\par
    \par
    Standard keys: c - cont, b - back, s - stop, r - refr, h - help\par
    ---------------------------------------------------------\par
    BR0662I Enter your choice:\par

  4. When you are prompted, specify the value for the device type (for example, util_file).

    BR0280I BRTOOLS time stamp: 2010-02-23 17.58.47\par
    BR0681I Enter string value for "device" (tape|tape_auto|tape_box|pipe|pipe_auto|pipe_box|disk|stage|
    util_file|util_file_online|rman_util|rman_disk|rman_stage) [util_file]:\par

  5. From the BRBackup main options menu, select the option to specify the parameter file (in the example, 4). Repeat this step and the following step to specify all inputs.

    BRBACKUP main options for backup and database copy\par
    \par
    1 - BRBACKUP profile (profile) ....... [initCER.sap]\par
    2 - Backup device type (device) ...... [util_file]\par
    3 # Tape volumes for backup (volume) . []\par
    4 ~ BACKINT/Mount profile (parfile) .. [?/dbs/init@.utl]\par
    5 - Database user/password (user) .... [/]\par
    6 - Backup type (type) ............... [offline_force]\par
    7 - Disk backup for backup (backup) .. [no]\par
    8 # Delete disk backup (delete) ...... [no]\par
    9 ~ Files for backup (mode) .......... [all]\par
    \par

  6. When you are prompted, enter the full path to the parameter file.

    BR0280I BRTOOLS time stamp: 2010-02-23 17.59.26\par
    BR0681I Enter string value for "parfile" [?/dbs/init@.utl]:\par

  7. Once all the options are selected, enter c to initiate the backup operation.

  8. The selected options summary is displayed. Enter c to continue the operation.

    BR0291I BRBACKUP will be started with options '-p initCER.sap -d util_file -r ?/dbs/initCER.utl -t online -m all -k no -l E'\par
    \par
    BR0280I BRTOOLS time stamp: 2010-02-23 18.03.38\par
    BR0670I Enter 'c[ont]' to continue, 'b[ack]' to go back, 's[top]' to abort:\par