Split Mirror Backup: Software Configuration

This section describes the software configuration for split mirror backup:

·        At least the client software and SQLPLUS components of the Oracle database software must be installed on the backup host.

·        The Oracle home directory structure must correspond to the SAP standard installation required by BRBACKUP.

Default Directories

UNIX

Windows

$ORACLE_HOME/dbs

%ORACLE_HOME%\DATABASE

$ORACLE_HOME/bin

%ORACLE_HOME%\BIN

$SAPDATA_HOME/sapbackup

%SAPBACKUP%

$SAPDATA_HOME/saparch

%SAPARCH%

$SAPDATA_HOME/sapreorg

%SAPREORG%

$SAPDATA_HOME/sapcheck

%SAPCHECK%

$SAPDATA_HOME/saptrace

%SAPTRACE%

BRBACKUP must be able to access the control files on the backup server created by the SQL command alter database backup controlfile to <filename> on the production server.

BRBACKUP tries to copy the control files to the backup server using the rcp or ftp command – depending on the value of stage_copy_cmd – and the host name for the HOST_NAME field of the V$INSTANCE view.

Alternatively, you can use Network File Systems (NFS) to mount the sapbackup directory from the production server to the backup server.

For more information, see SAP Note 156704.

·        The Oracle and BRBACKUP profiles should be available in $ORACLE_HOME/dbs or %ORACLE_HOME%\DATABASE.

·        Set the backup_type parameter in the init<DBSID>.sap profile to offline_split |online_split|offline_mirror|online_mirror.

·        To establish the connection between the backup server and the production server, you must define the profile parameter primary_db for the SQLNET connection. Before this, you must perform the following steps on the primary database host:

Ў        Create an Oracle password file:

orapwd file=<ORACLE_HOME>/dbs/orapw<DBSID>
password=<SYS password> entries=10

Ў        Set the remote_login_passwordfile parameter to exclusive in the init<DBSID>.ora profile.

Ў        Give the system user SYSOPER authorization in the production database. Start SQLPLUSas user SYS and execute the following Oracle command:

SQL> connect / as sysdba

SQL> grant sysoper to system;

Ў        If needed, change the password for the system user:

SQL> alter user system identified by <password>;

The SYSOPERauthorization and the password file are only required to stop the primary database for the offline split. For an online split, the standard remote connection using the instance string specified in the primary_db parameter is sufficient.

The primary database must remain open during the entire backup.

·        Make sure that the directory /usr/sap/<SAPSID>/SYS/exe/run or \\<Host name>\sapmnt\<SAPSID>\SYS\exe\run is accessible from the backup host and that it contains at least the programs BRBACKUP, BRCONNECT, and BRTOOLS  (and optionally other BR programs).

Normally make sure that the paths of all database files accessed by the production database and backup database are identical, although this is not absolutely essential.

You can mount the database files on the backup host in a different SAPDATA_HOME directory by using the init<DBSID>.sapparameter orig_db_home. By using this parameter you can even mount the split-off files on the same host.

The manufacturer of the external backup tool should install and configure the BACKINT interface on the backup host, if used.

Profile Parameters and Command Options for init<DBSID>.sap

Make sure that the following parameters are set in the initialization profile init<DBSID>.sap:

·        backup_type = offline_split|online_split|offline_mirror|online_mirror

·        Split command scenario using offline_split or online_split:

Ў        split_cmd = "<split_cmd> [$]"

<split_cmd> is a program or shell script called by BRBACKUP to split the mirror disks.

Ў        resync_cmd = "<resync_cmd> [$]"

<resync.cmd> is a program or shell script called by BRBACKUP to resynchronize the mirror disks. If this parameter is not set, BRBACKUP does not perform the resynchronization.

At runtime, BRBACKUP replaces the optional character $ with the name of the text file that contains the names of all files to be split or resynchronized.

If split_cmd/resync_cmd is completed successfully, an exit code of 0 is returned. Only messages beginning with #INFO are accepted, that is, these are the only messages not interpreted as error messages. If the command is not successful, a return code of > 0 is returned as well as messages describing the cause of the error.

·        SPLITINT scenario using offline_mirror or online_mirror:

Ў        split_options = “<split_options>”

This defines the additional options used to call SPLITINT. Your SPLITINT vendor can tell you how to set them.

Ў        split_resync = no|yes

This controls whether the mirror disks should be resynchronized immediately after the backup has finished.

·        primary_db = <inst_str>

<inst_str> is an instance string to the production database to connect from the backup server to the production server. The connections are defined in the Oracle configuration file tnsnames.ora.

·        The BRBACKUP call is as follows:

Ў        Splitcommand scenario:

§         brbackup -t|type online_split Online backup of mirror disks

§         brbackup -t|type offline_split Offline backup of mirror disks

Ў        SPLITINT scenario:

§         brbackup -t|type online_mirror Online backup of mirror disks

§         brbackup -t|type offline_mirror Offline backup of mirror disks

For more information, see -t|-type. This command line option overrides the backup type set in the backup_type parameter in the init<DBSID>.sapprofile.