Examples of Restore Operations for SAP on Oracle RAC

The following examples uses online rman_util for Full, Incremental, and Log backups.

Example 1: Restoring a SAP Oracle rman_util In-Place Using BRRESTORE

  1. Restore SAP Oracle Control Files:

    [root@sde-hana3 sapbackup]# /u01/app/12.1.0/grid/bin/srvctl stop database -d N74
    [root@sde-hana3 sapbackup]# /u01/app/12.1.0/grid/bin/srvctl start database -d N74 -startoption nomount
    brrestore -d util_file -b2 84920386_1217781 -m /oracle/N74/sapreorg/cntrlN741.dbf -c force -u //
    #FILE..... /oracle/N74/sapreorg/cntrlN741.dbf
    #RESTORED. 84920386_1217781
  2. Copy the control files to Mirror locations using RMAN:

    sde-hana3:n74adm 96> rman
    Recovery Manager: Release 12.1.0.2.0 - Production on Sat Jun 5 23:12:09 2021
    Copyright (c) 1982, 2014, Oracle and/or its affiliates.  All rights reserved.
    RMAN> connect target /
    connected to target database: N74 (not mounted)
    RMAN> restore controlfile to '+DATA/N74/cntrlN74.dbf' from '/oracle/N74/sapreorg/cntrlN741.dbf';
    Starting restore at 05-JUN-21
    using target database control file instead of recovery catalog
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=121 instance=N741 device type=DISK
    channel ORA_DISK_1: copied control file copy
    Finished restore at 05-JUN-21
    RMAN> restore controlfile to '+ARCH/N74/cntrlN74.dbf' from '/oracle/N74/sapreorg/cntrlN741.dbf';
    Starting restore at 05-JUN-21
    using channel ORA_DISK_1
    channel ORA_DISK_1: copied control file copy
    Finished restore at 05-JUN-21
    RMAN> restore controlfile to '+RECO/N74/cntrlN74.dbf' from '/oracle/N74/sapreorg/cntrlN741.dbf';
    Starting restore at 05-JUN-21
    using channel ORA_DISK_1
    channel ORA_DISK_1: copied control file copy
    Finished restore at 05-JUN-21
    RMAN>

Example 2: Restore the SAP Oracle rman_util Data from Full and Incremental

[root@sde-hana3 sapbackup]# /u01/app/12.1.0/grid/bin/srvctl stop database -d N74
[root@sde-hana3 sapbackup]# /u01/app/12.1.0/grid/bin/srvctl start database -d N74 -startoption mount
brrestore -p initN741.sap -b bfgpkled.fnr -d rman_util -r /oracle/N74/sapprof/initN74.utl -m all -c force -u //
brrestore -p initN741.sap -b bfgpkoqy.inr -d rman_util -r /oracle/N74/sapprof/initN74.utl -m incr -c force -u //

Example 3: Restore SAP Oracle rman_util Logs

brrestore -p initN741.sap -a N741,108-109,N742,98-99==+ARCH/n74/oraarch -d rman_util -c force -u //
SQL> select status from v$instance;
STATUS
------------
MOUNTED
SQL> recover database using backup controlfile until cancel;
Log applied.
Media recovery complete.
SQL> alter database open resetlogs;
Database altered.
SQL> select status from v$instance;
STATUS
------------
OPEN
SQL>
[root@sde-hana3 sapbackup]# /u01/app/12.1.0/grid/bin/srvctl status database -d N74
Instance N741 is running on node sde-hana3
Instance N742 is running on node sde-hana7
[root@sde-hana3 sapbackup]#  /u01/app/12.1.0/grid/bin/crsctl stat res -t
      1        ONLINE  ONLINE       sde-hana3                Open,STABLE
      2        ONLINE  INTERMEDIATE sde-hana7                Mounted (Closed),STABLE
[root@sde-hana3 sapbackup]# /u01/app/12.1.0/grid/bin/srvctl stop database -d N74
[root@sde-hana3 sapbackup]# /u01/app/12.1.0/grid/bin/srvctl start database -d N74
root@sde-hana3 sapbackup]#  /u01/app/12.1.0/grid/bin/crsctl stat res -t
      1        ONLINE  ONLINE       sde-hana3                Open,STABLE
      2        ONLINE  ONLINE       sde-hana7                Open,STABLE

Example 4: Restore Using BRRECOVER

You can use BRRECOVER for in-place restore and database copy. This example considers source backup using SAP Oracle rman_util.

sde-hana3:n74adm 71> cat backN741.log
bfgpkled fnr  2021-06-05 20:27:59  2021-06-05 20:34:51  1  ...............     16    16     0       106         16653790      107         16713807  FULL         online          rman_util        ------ 7.40 (34)  N741           96       97 N742
bfgpkoqy inr  2021-06-05 21:07:20  2021-06-05 21:13:36  1  ...............     16     1     0       108         16713862      109         16716311  INCR         online          rman_util        ------ 7.40 (34)  N741           98       99 N742
brrecover -f N74 -t dbpit -seq last -d rman_util -b bfgpkoqy.inr -c force -u //

Example 5: Restore Using BRRECOVER for Database Copy to Different DB_SID Name

Consider that the source DB_SID named as N74 has thread instance name N741 and N742, and Destination DB_SID named as O74 has thread instance name O741 and O742. 
The steps and examples outlined below are based on RAC dedicated database instance (DDB) instance N741 of source, and RAC dedicated database instance (DDB) instance O741 of destination.

1.  From Source, transfer data backup summary file and the data backup detail file from sapbackup folder to destination sapbackup directory. For example: the backN741.log is a data backup summary file and bfptmcsl.fnr is a data backup detail file. 
    On Destination, the RAC DDB instance O741 detail file is renamed from backN741.log to backO741.log.

2.  From Source, transfer log backup summary files and log detail files from saparch folder to destination saparch directory. For example, archN741.log and archN742.log and one or many log detail files in saparch folder of destination.
    On Destination RAC, DDB instance O741 detail files are renamed from archN741.log to archO741.log. Also, archN742.log is renamed to archO742.log

3.  Consider a PIT Database copy on Destination. 
    For Example, command_line : brrecover -f O74 -t dbpit -pit 2024-11-17 20:41:08 -d rman_util -b bfptmcsl.fnr -c force -u //

4.  If you are trying latest Database Copy on Destination where source contains data incremental job, pick the latest incremental data job and transfer both full and incremental detail files to the sapbackup folder on destinaion.
    For Example, command_line : brrecover -f O74 -t dbpit -seq last -d rman_util -b bfgpkoqy.inr -c force -u //
×

Loading...