SnapProtect - Advanced Configuration - SAP Oracle

Table of Contents

Enabling SAP Specific SnapProtect Backups

When using SAP environments with BRTools version 7.1 and above, you can perform SnapProtect backups using the util_vol or util_vol_online backup interfaces. These backup interfaces are provided by SAP to take volume level backups of the database.

Before You Begin

  • Configure the parameters in the init<SID>.sap file

    UNIX

    Parameter Value Description
    util_vol_access copy Specifies that the SnapProtect backups can be copied to a different target location for verification purposes.
    util_vol_nlist no_check Deactivates the BACKINT check of the backup volumes. This check makes sure that the backup volumes do not contain non-database files or database files that belong to a database other than the one that you want to back up.

    You can set this parameter to disable a specific non-database file. For example, util_vol_nlist = (/oracle/oracle10g/CER/sapdata6/non_db_file)

    Warning: If the database volumes contain non-database files or database files from a database other than the one that you want to back up, the files can be overwritten without warning.

    util_file_unit all_data Specifies that the smallest unit for the SnapProtect backup is the sapdata, origlog, or mirrorlog directories.

    Windows

    Parameter Value Description
    util_vol_access copy Specifies that the SnapProtect backups can be copied to a different target location for verification purposes.
    util_vol_nlist no_check Deactivates the BACKINT check of the backup volumes. This check makes sure that the backup volumes do not contain non-database files or database files that belong to a database other than the one that you want to back up.

    You can set this parameter to disable a specific non-database file. For example, util_vol_nlist = (E:\oracle\oracle10g\CER\sapdata6\non_db_file)

    Warning: If the database volumes contain non-database files or database files from a database other than the one that you want to back up, the files can be overwritten without warning.

    util_file_unit all_data Specifies that the smallest unit for the SnapProtect backup is the sapdata, origlog, or mirrorlog directories.

Backups Using UTIL_VOL Interface

When you perform backups using the util_vol backup interface, the entire database is locked till the SnapProtect backup operation is completed.

Use the following steps to run SnapProtect backups using util_vol backup interface:

  1. From the CommCell Browser, navigate to Client Computers | <Client>.
  2. Right-click the <Client> and select Properties.
  3. Click on the Advanced tab.
  4. Select Enable SnapProtect to enable SnapProtect backup for the client.
  5. Click OK.
  6. From the CommCell Browser, navigate to <Client> | SAP for Oracle.
  7. Right-click the <Instance>, point to All Tasks, and select New Subclient.
  8. In the Subclient Name box, type a name.
  9. Click the SnapProtect Operations tab.
  10. Click SnapProtect to enable SnapProtect backup for the selected subclient.
  11.  In the Available Snap Engine drop-down box, select the storage array.
  12. Click the Content tab.
  13. Click Util_Vol.
  14. Click the Storage Device tab.
  15. In the Data Storage Policy box, select the storage policy name.
  16. Click OK.

Backups Using UTIL_VOL_ONLINE Interface

The util_vol_online backups are similar to the util_vol backups. However, when using these type of backups, each volume that is being backed up is locked during the backup and is released once the SnapProtect backup is completed.

Use the following steps of run SnapProtect backups using util_vol_online backup interface:

  1. From the CommCell Browser, navigate to Client Computers | <Client>.
  2. Right-click the <Client> and select Properties.
  3. Click on the Advanced tab.
  4. Select Enable SnapProtect to enable SnapProtect backup for the client.
  5. Click OK.
  6. From the CommCell Browser, navigate to <Client> | SAP for Oracle.
  7. Right-click the <Instance>, point to All Tasks, and select New Subclient.
  8. In the Subclient Name box, type a name.
  9. Click the SnapProtect Operations tab.
  10. Click SnapProtect to enable SnapProtect backup for the selected subclient.
  11.  In the Available Snap Engine drop-down box, select the storage array.
  12. Click the Content tab.
  13. Click Util_Vol_online.
  14. Click the Storage Device tab.
  15. In the Data Storage Policy box, select the storage policy name.
  16. Click OK.

SnapProtect Backup for SAP Split-Mirror Disks (Splitint Support)

You can perform SnapProtect backups on the SAP Oracle database files of the split-mirror disks. You must perform these backups on a backup (proxy) server instead of a production server using BRBACKUP tool through the Splitint Interface. This will allow you to offload your production server from data protection operations as these operations are now moved and performed on the proxy server. You can control the splitting and synchronization of the split-mirror disks using BRBACKUP. BRBACKUP also communicates with the production database to obtain the information about the database structure and stores all results of the backups. This process allows the Computing Center Management System (CCMS) to monitor the backups in the SAP production system.

You can use the backint util_file interface to perform an SnapProtect backup of the split-mirror disks on the production server. Later, you can even mount these snapshots on the proxy or production server and copy any data file needed. You can also perform restores on the production or proxy server either from the snapshots or the snap copies depending upon the selected copy precedence.

Configuring BRBACKUP for Split-Mirror Disk Backups

You must configure a SAP Oracle instance for both the source and proxy client. You must configure the following on the production and proxy servers before performing split-mirror disk backups using BRBACKUP: 

  1. We would need to create the SAP Instance from CommCell GUI for both Source and Proxy client. Install the Oracle SID on both the production and proxy servers. Make sure to install the same Oracle SID and maintain the same directory structure on both the production and proxy servers.
  2. Add the following parameter:

    $ORACLE_HOME/dbs/init<SID>.utl file:

    CvSrcClient

    <Source_Client_Name>

    Example:

    Production=tigersnap
    Proxy=tigersnap2

    $ORACLE_HOME/dbs/init<SID>.utl file on the Proxy
    CvSrcClient
    tigersnap

  3. Configure the Snap-able volumes on the production server.

    Example:

    [root@tigersnap ~]# df -k
    Filesystem 1K-blocks Used Available Use% Mounted on
    /dev/mapper/VolGroup00-LogVol00
    32408432 30528060 207568 100% /
    /dev/sda1 101086 14827 81040 16% /boot
    tmpfs 972264 0 972264 0% /dev/shm
    /dev/sdj1 1031888 17736 961736 2% /home/oracle/product/10g/dbs
    /dev/sdg1 5156292 1373028 3521336 29% /home/oracle/product/10g/CER
    /dev/sdh1 3093976 831496 2105312 29% /home/oracle/product/10g/CER/DATA
    /dev/sde1 2062716 118036 1839900 7% /home/oracle/product/10g/CER/LOG
    [root@tigersnap ~]# ls -l /home/oracle/product/10g/CER
    total 48
    drwxrwx--- 9 oracle oracle 4096 Apr 27 17:52 DATA
    drwxrwx--- 7 oracle oracle 4096 May 29 16:34 LOG
    drwxrwxrwx 2 oracle oracle 16384 Apr 27 10:56 lost+found
    drwxrwxr-x 3 oracle oracle 4096 May 30 02:00 saparch
    drwxrwxr-x 2 oracle oracle 4096 May 29 16:37 sapbackup
    drwxrwxr-x 2 oracle oracle 4096 Apr 27 11:13 sapcheck
    drwxrwxr-x 2 oracle oracle 4096 Apr 30 11:11 sapreorg
    drwxrwxr-x 3 oracle oracle 4096 Apr 27 11:13 sapscripts
    drwxrwxr-x 4 oracle oracle 4096 Apr 27 11:13 saptrace
    [root@tigersnap ~]# ls -l /home/oracle/product/10g/CER/LOG
    total 76
    drwxrwxr-x 2 oracle oracle 4096 May 29 16:34 mirrlogA
    drwxrwxr-x 2 oracle oracle 4096 May 29 16:34 mirrlogB
    -rw-r----- 1 oracle oracle 2560 Oct 22 2010 orapwCER
    drwxrwx--- 2 oracle oracle 4096 May 29 16:34 origlogA
    drwxrwx--- 2 oracle oracle 4096 May 29 16:34 origlogB
    -rw-r----- 1 oracle oracle 2560 May 29 11:59 orapwCER
    [root@tigersnap ~]#

  4. Configure the volumes on the proxy server. Make sure that the data, logs, control files and the mirror are configured on separate volumes. This is to ensure that the sapbackup directory on the proxy is not replaced when you mount the snapshots /split-mirror disks on the proxy server.
  1. Configure the SSH with user equivalence (RSA Key sharing) between OraSID's on both the proxy server and production server. If you do not configure the SSH sharing, you will be prompted for the account passwords multiple times.

    You should meet the following User equivalency requirements:

    • You should have the same user name, UID and password on both the production and proxy servers
    • You should belong to the same group with the same group ID.
    Example:

    Make sure you get the same results on the production and the proxy:

    [oracle@tigersnap 10g]$ id oracle
    uid=501(oracle) gid=501(oracle) groups=501(oracle),502(dba)
    [oracle@tigersnap2 10g]$ id oracle
    uid=501(oracle) gid=501(oracle) groups=501(oracle),502(dba)

  2. Configure the Oracle Parameters on SID of both the production and proxy servers. Setup *.ora, *.sap, *.utl parameters on both the Production and Proxy servers.
  3. Configure the TNS names on the production and proxy servers.

    Example:

    [oracle@tigersnap admin]$ pwd
    /home/oracle/product/10g/network/admin
    [oracle@tigersnap admin]$ more tnsnames.ora
    # tnsnames.ora Network Configuration File: /home/oracle/product/10g/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = tigersnap.commvault.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    )
    )

    CER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = tigersnap.commvault.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = CER)
    )
    )

    CER.tigersnap =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = tigersnap.commvault.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = CER)
    )
    )

    CER.tigersnap2 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = tigersnap2.commvault.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = CER)
    )
    )

    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )
    )

  4. Add the service name entries on the production server.

    Example:

    [oracle@tigersnap 10g]$ lsnrctl stop
    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 06-OCT-2011 03:00:02
    Copyright (c) 1991, 2005, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    The command completed successfully

    [oracle@tigersnap 10g]$ sqlplus "/ as sysdba" SQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 6 03:00:13 2011
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> shutdown immediate;
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup nomount
    ORACLE instance started.
    Total System Global Area 88080384 bytes
    Fixed Size 1217836 bytes
    Variable Size 79694548 bytes
    Database Buffers 4194304 bytes
    Redo Buffers 2973696 bytes
    SQL> show parameters service_names
    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    service_names string CER
    SQL> alter system set service_names='CER,CER.tigersnap'
    2 ;
    System altered.

    SQL> show parameters service_names;
    NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    service_names string CER,CER.tigersnap
    SQL> shutdown immediate
    ORA-01507: database not mounted
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 88080384 bytes
    Fixed Size 1217836 bytes
    Variable Size 79694548 bytes
    Database Buffers 4194304 bytes
    Redo Buffers 2973696 bytes
    Database mounted.
    Database opened.
    SQL> quit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options

    [oracle@tigersnap 10g]$ lsnrctl start

    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 30-MAY-2012 21:12:37

    Copyright (c) 1991, 2005, Oracle. All rights reserved.

    Starting /home/oracle/product/10g/bin/tnslsnr: please wait...

    TNSLSNR for Linux: Version 10.2.0.1.0 - Production
    System parameter file is /home/oracle/product/10g/network/admin/listener.ora
    Log messages written to /home/oracle/product/10g/network/log/listener.log
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
    Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tigersnap.commvault.com)(PORT=1521)))

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
    Start Date 30-MAY-2012 21:12:39
    Uptime 0 days 0 hr. 0 min. 0 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /home/oracle/product/10g/network/admin/listener.ora
    Listener Log File /home/oracle/product/10g/network/log/listener.log
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=tigersnap.commvault.com)(PORT=1521)))
    Services Summary...
    Service "CER" has 1 instance(s).
    Instance "CER", status UNKNOWN, has 1 handler(s) for this service...
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    The command completed successfully
    [oracle@tigersnap 10g]$

  5. Configure the InitSID.* on the Production server.
    1. Add the following to initCER.sap

      RMAN_PARMS="BLKSIZE=1048576,SBT_LIBRARY=/opt/simpana2/Base/libobk.so,
      ENV=(CvClientName=tigersnap,CvInstanceName=instance001)"
      _rman_sess_stmt = ("alter session set optimizer_mode=RULE")

    2. Add the following to initCER.ora
    3. remote_login_passwordfile = EXCLUSIVE
      control_file_record_keep_time = 100

    4. Add the following to initCER.utl
    5. CvInstanceName
      Instance001
      snapBackup
      1
      numstreams
      1
      CV_restCopyPrec
      0

  6. Configure the InitSID.* on the Proxy server.
    1. Add the following to initCER.sap
    2. primary_db = CER.tigersnap
      stage_copy_cmd = scp
      pipe_copy_cmd = ssh
      rman_channels = 1
      rman_filesperset = 64

      For example:

      RMAN_PARMS="BLKSIZE=1048576,SBT_LIBRARY=/opt/simpana2/Base/libobk.so,
      ENV=(CvClientName=tigersnap2,CvInstanceName=instance001,CvSrcClient=tigersnap)"
      _rman_sess_stmt = ("alter session set optimizer_mode=RULE")

    3. Add the following to initCER.ora
    4. control_file_record_keep_time = 100

    5. Add the following to initCER.utl
    6. CvInstanceName
      Instance001
      snapBackup
      0
      numstreams
      1

  7. The Snapshots/Split-mirror disks will be mounted (in place) on the proxy server. Make sure that those pertinent directories are empty on the proxy.
  8. Install the SAP Oracle iDataAgent on both the production and proxy servers.
  9. Configure the instance for the production server in the CommCell Console. See Configuration for step-by-step instructions on how to configure an instance,

Additional Configuration Required for Offline Mirror on the Production Server:

  1. Create an Oracle password file using the following command.
  2. orapwd file=<ORACLE_HOME>/dbs/orapw<DBSID> password=<SYS password> entries=10

    For example

    oracle@tigersnap 10g]$ orapwd file=/home/oracle/product/10g/dbs/orapwCER password=manager entries=10 force=Y

  3. Configure the remote_login_passwordfile parameter to exclusive in the init<DBSID>.ora profile.
  4. Authorize the system user with SYSOPER authorization in the production server.
  1. Start the SQLPLUS as user SYS and execute the Oracle command:

    If needed, change the password for the system user.

    SQL> connect / as sysdba SQL> grant sysoper to system;

    Changing the password for the system user:

    SQL> alter user system identified by <password>;

Performing Split-Mirror Disk Backups Using BRBACKUP

Use the BRBACKUP tool through Splitint interface on the proxy server instead of production server with either an online_mirror or offline_mirror for performing split-mirror disk backups. Use the util_file interface to perform these backups.

  • Use the following BRBACKUP command to perform split-mirror disk backups with online_mirror using util_file interface:

    brbackup -d util_file -t online_mirror -m all -c

  • Use the following BRBACKUP command to perform split-mirror disk backups with offline_mirror using util_file interface:

    brbackup -d util_file -t offline_mirror -m all -c

Creating Subclient for Selective Online Full Backups

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.

Before You Begin

  1. Create a Selective Copy.
  2. Create an instance.

Procedure

  1. From the CommCell Browser, expand Client Computers > client > SAP for Oracle.
  2. Right-click the instance, point to All Tasks and then click New Subclient.

    The Create New Subclient dialog box appears.

  3. On the General tab, in the Subclient name box, enter the subclient name.
  4. On the Content tab, select the Selective Online Full check box and select the Backup Device type. If  the subclient is for a RAC instance, select Rman_util.
  5. On the Storage Device tab, in the Data Storage Policy list, select the storage policy name with the selective copy.
  6. Click OK to close the Creating New Subclient dialog box.

Configuring the Storage Policy for a Log Backup during a Selective Online Full Backup

When a selective online full backup is running, by default log backups use the data storage policy.

To have log only backups which run in parallel with selective online full backups use the log storage policy execute the following command. Note when this is run, the log phase of the selective online full backup still uses the data storage policy.

qoperation execscript -sn SetKeyIntoGlobalParamTbl.sql -si JMDontForceDataSPForLogBkp -si y -si 1

To have log only backups that are part of a selective online full backup use the data storage policy, execute the following command.

qoperation execscript -sn SetKeyIntoGlobalParamTbl.sql -si JMDontForceDataSPForLogBkp -si n

SnapProtect Backup on NFS Volume

You can perform SnapProtect backup of SAP for Oracle when the database is on a NFS Volume. However, you will require a root access in the storage device's NFS configuration to be able to read and write on the accessible SAP for Oracle files i.e., the host on which the NFS Volume is mounted.

You can also perform SnapProtect backup of SAP for Oracle if the database resides on a Direct NFS volume. SnapProtect backup supports volumes using the Oracle Direct NFS (dNFS) protocol.

File level revert is performed by default when revert restore is run on NFS volumes. For Volume Level revert on NFS volumes, use the sUSE_FILE_LEVEL_REVERT Additional Setting. File level revert cannot be performed when the database resides on regular SAN Volumes (LUNs).

Consider the following while performing an SnapProtect backup for data or databases that reside on an NFS Volume:

  • The export name on the storage device should be the same as the storage path on the storage device.

    E.g., if the storage path of the storage device is /vol/Volume/Qtree, use /vol/Volume/Qtree as the export name and not an alias such as /ExportName.

  • You can use the exports both at the root of a NetApp volume and at subdirectory levels below the root of the volume.
  • Make sure that the storage device is accessible from the source and proxy machine (even if they exist in different domains) using the storage device's short name while mounting NFS exports from the storage device. Make sure to enter the storage device credentials using its short name. Do not use an IP address or the fully qualified domain name.

    E.g., use a short name for the server such as server1 or server2.

Enabling Volume Level Reverts on NFS Volumes

  1. From the CommCell Browser, navigate to Client Computers.
  2. Right-click the <Client>, and then click Properties.
  3. Click Advanced and then click Additional Settings tab.
  4. Click Add.
  5. In the Name field, type sUSE_FILE_LEVEL_REVERT.

    The Category and Type fields are populated automatically.

  6. In the Value field, type N.
  7. Click OK.