Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Enjoy members-only rewards and discounts
  • Create and access a list of your products

PowerProtect Data Manager 19.10 Oracle RMAN User Guide

Restore to an alternate host

You can restore an Oracle backup of a source client for disaster recovery or for a cross-restore to an alternate client host.

About this task

Perform the following steps to complete the restore to an alternate host for disaster recovery or for a cross-restore operation.

To automate these steps, you can run the following RMAN script after making any required changes to the Oracle DBID and autobackup file name. This sample RMAN script is used to restore to a different host with the same file structure as the source host. The following steps provide more details.

set DBID =1575537735;
run {
set CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO './ PLCTLP-4eb04bd9-b825-4e72-b668-14e9aacaa522/%F';
startup nomount;
restore spfile from autobackup;
shutdown immediate;
startup nomount;
restore controlfile from autobackup;
alter database mount;
restore database;
recover database until sequence 495;
alter database open resetlogs;
}

Steps

  1. In the mandatory parameter setting EXCLUDE_SID=<Oracle SID>, specify the Oracle production database SID (instance name).

    To obtain the instance name, run the following command in the SQLPlus utility as an Oracle user in the production database. For example:

    SQL> SELECT INSTANCE_NAME FROM V$INSTANCE;
    
    INSTANCE_NAME
    -------------
    orcl

    Specify the INSTANCE_NAME value in the EXCLUDE_SID=<Oracle SID> parameter setting in the configuration file $RMAN_AGENT_HOME/config/rman_agent.cfg. This setting prevents any duplicate discovery during an Oracle redirected restore. Configuration file requirements for connection to local databases provides details about the parameter settings in the configuration file.

  2. To obtain details about the DD host and storage unit that PowerProtect Data Manager has registered with the Oracle RMAN agent, run the ddutil -s command as the root user or oracle user on the source client host.
    1. SSH to the source client host as the oracle user.
    2. Run the ddutil -s command from the $RMAN_AGENT_HOME/bin directory. For example:
      ./ddutil -s
      
      PowerProtect DD hostname: 10.63.96.240
      
         FC service name: None
         FC service enabled: false
      
         Storage Unit: POLICYwlt-blrv136g140-6d974
         Top Level Path: PLCTLP-43be371a-37fa-44d1-8351-30eac82e713e
      
                 User: POLICYwlt-blrv136g140-6d974
                 Type: PROTECTION
      
         Storage Unit: oracle-replicate_IoGJL-blrv136h018-3d069
         Top Level Path: PLCTLP-1d967258-a3fd-4648-8b73-96d570b25a03
      
                 User: oracle-replic-blrv136h018-3d069
                 Type: PROTECTION

      Record the DD system hostname or IP address, storage unit name, top-level pathname, and DD Boost username.

  3. Obtain the DD Boost storage unit password.
    1. If required, obtain the PowerProtect Data Manager IP address from the agent-id.yml file in the /opt/dpsapps/agentsvc directory.
    2. Log in to the PowerProtect Data Manager, and complete the steps in View the storage unit password.

      For example, the following command displays the DD Boost storage unit password:

      python get_dd_mtree_credential.py ppdm-1910-blrv034d018-75914
      ==============PowerProtect DD MTree credential==============
      Full MTree path: /data/col1/ppdm-1910-blrv034d018-75914
      User name: ppdm-1910-blrv034d018-75914
      Password: IwWXT#DC93m={XV+K
      ============================================================

      Record the DD Boost storage unit password.

  4. Install the Oracle RMAN agent on the target client.
  5. Register the target client lockbox to the source client storage unit.
    1. SSH to the target client host as the oracle user.
    2. To register the lockbox, run the ddutil -C command from the $RMAN_AGENT_HOME/bin directory. At the command prompts, type the DD system hostname, storage unit name, and DD Boost username that you recorded from the source client. For example:
      ddutil -C
      
      PowerProtect DD server name: 10.125.198.116
      PowerProtect DD storage unit name:  ppdm-1910-blrv034d018-75914
      DD Boost username:  ppdm-1910-blrv034d018-75914
      Password:
      Re-enter password:
      Successfully set the DD Boost credentials in the lockbox.
      Press y or Y to add more storage unit details. Press n or N to exit:
  6. Obtain the database identifier (DBID) for the target database.
    NOTE To restore the spfile from the autobackup, you will need to set the DBID for the target database.
    1. On the target client, to list the available backups in the storage unit, run the following command:
      ddutil -f -z <DD_system>:/<storage_unit_name>

      where <DD_system> and <storage_unit_name> are values that you recorded from the source client.

      The following type of information appears on the console:

      Type   Perm   Size        Time                                      Path
      ------------------------------------------------------------------------------
      file   644    18874368    Fri Aug   7 13:06:31 2020  (1596785791)   /<storage-unit-name>/c-<dbid>-20200807-03
      file   644    18874368    Fri Aug   7 13:03:19 2020  (1596785599)   /<storage-unit-name>/c-<dbid>-20200807-02
      file   644    18874368    Fri Aug   7 12:47:09 2020  (1596784629)   /<storage-unit-name>/c-<dbid>-20200807-01
      file   644    18874368    Fri Aug   7 12:37:39 2020  (1596784059)   /<storage-unit-name>/c-<dbid>-20200807-00
      file   644    262144      Fri Aug   7 13:06:29 2020  (1596785789)   /<storage-unit-name>/Automated_spfile_ORCL_<dbid>_14v78u8g_1
      file   644    262144      Fri Aug   7 12:37:38 2020  (1596784058)   /<storage-unit-name>/Automated_spfile_ORCL_<dbid>_0hv78sim_1
      file   644    262144      Fri Aug   7 13:06:24 2020  (1596785784)   /<storage-unit-name>/Automated_data_ORCL_<dbid>_12v78u81_1
      

      Because you have registered the target client to the storage unit, the backup path contains the DBID as indicated in the example output. Record the DBID.

      If you are performing a cross-restore to an alternate host, you can list the available backups from the source client instead.

    2. If you cannot obtain the DBID because the server is corrupted or because of a disaster, use the PowerProtect Data Manager REST API.
      Alternatively, check the contents of the DD Boost storage unit CIFS or NFS share.
    3. If you still cannot obtain the DBID for the database, the Oracle DBA can obtain the DBID from the control file.
  7. Create the required folders on the target client. The following example shows the creation of audit, recovery, and control file destination folders that are the same as on the source client:
    • Create the audit file destination folder /home/oracle/app/oracle/admin/orcl/adump.
    • Create the recovery file destination folder /home/oracle/app/oracle/fast_recovery_area.
    • Create the control file destination folder /home/oracle/app/oracle/oradata.
    Ensure that each folder has the same permissions as the Oracle home path $RMAN_AGENT_HOME/bin.
    NOTE If you must perform the restore to a target host that has a different directory file structure than the source host, then you can create the pfile from the spfile, to update the file directory structure in the pfile.
  8. Start the Recovery Manager on the target client.
    1. Go to the /home/oracle/<version>/bin/ directory, where <version> is the installed Oracle version.
    2. If you have not already done so, run the following command to set the Oracle environment variables:
      . oraenv

      For the ORACLE_SID variable, type orcl.

      For the ORACLE_HOME variable, type /home/oracle/<version>/.

      Oracle sets the required environment variables.
    3. To start the Recovery Manager with default parameters, run the following command:
      rman target /

      The following type of information appears on the console:

      Recovery Manager: Release 19.0.0.0.0 - Production on Mon Aug 10 19:15:06 2020
      Version 19.3.0.0.0
      Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
      connected to target database (not started)
      RMAN>
  9. To start the Oracle instance with default parameters in the nomount mode, run the following command in Recovery Manager:
    startup nomount;

    Later steps retrieve the correct parameter file from the backup.

    The following type of information appears on the console:

    startup failed: ORA-01078: failure in processing system parameters
    LRM-00109: could not open parameter file '/home/oracle/19.3/dbs/initorcl.ora'
    starting Oracle instance without parameter file for retrieval of spfile
    Oracle instance started
    
    Total System Global Area    1073737800 bytes
    Fixed Size                  8904776 bytes
    Variable Size               276824064 bytes
    Database Buffers            784334848 bytes
    Redo Buffers                3674112 bytes
  10. Set the DBID, and restore the spfile to the $ORACLE_HOME/dbs directory. For example:
    NOTE

    If the restore is performed to a different directory file structure, add the command create pfile from spfile; in the following RMAN script. You can edit the pfile manually to update the new directory file structure.

    You can specify the different file paths and file names to restore the spfile and pfile. For example:

    restore spfile to '/u01/oracle/19.3/dbs/spnewdb.ora' from autobackup;
    create pfile from spfile='/u01/oracle/19.3/dbs/spnewdb.ora';
    RMAN> set DBID=1575537735;
    executing command: SET DBID
    
    RMAN> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO './PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/%F';
    executing command: SET CONTROLFILE AUTOBACKUP FORMAT
    
    RMAN> run {
    2>
    3> ALLOCATE CHANNEL C1 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    4>
    5> ALLOCATE CHANNEL C2 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    6>
    7> ALLOCATE CHANNEL C3 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    8>
    9> ALLOCATE CHANNEL C4 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    10> 
    11> restore spfile from autobackup; 
    12>
    13> }
    
    using target database control file instead of recovery catalog
    allocated channel: Cl
    channel Cl: SID=27 device type=SBT_TAPE
    channel Cl: PowerProtect DD Boost API
    
    allocated channel: C2
    channel C2: SID=28 device type=SBT_TAPE
    channel C2: PowerProtect DD Boost API
    
    allocated channel: C3
    channel C3: SID=24 device type=SBT_TAPE
    channel C3: PowerProtect DD Boost API
    
    allocated channel: C4
    channel C4: SID=25 device type=SBT_TAPE
    channel C4: PowerProtect DD Boost API
    
    Starting restore at 07-JAN-22
    
    channel C1: looking for AUTOBACKUP on day: 20220107
    channel C1: AUTOBACKUP found: ./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/c-1617195089-20220107-05
    channel C2: looking for AUTOBACKUP on day: 20220107
    channel C2: skipped, AUTOBACKUP already found
    channel C3: looking for AUTOBACKUP on day: 20220107
    channel C3: skipped, AUTOBACKUP already found
    channel C4: looking for AUTOBACKUP on day: 20220107
    channel C4: skipped, AUTOBACKUP already found
    channel C1: restoring spfile from AUTOBACKUP ./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/c-1617195089-20220107-05
    channel C1: SPFILE restore from AUTOBACKUP complete
    Finished restore at 07-JAN-22
    released channel: C1
    released channel: C2
    released channel: C3
    released channel: C4
  11. Verify the restored spfile in the $ORACLE_HOME/dbs directory.
    1. Open a second SSH session to the target client Oracle server host as the oracle user.
    2. Go to the $ORACLE-HOME/dbs directory.
    3. To list the contents of the directory, run the following command:
      ls -lrt

      The following type of information appears on the console:

      total 24
      rw-r--r--. 1 oracle oracle 3079 May 14  2015 init.ora
      rw-rw----. 1 oracle oracle 1544 Feb  3  2020 hc_orc119.dat
      rw-rw----. 1 oracle oracle 1544 Aug 10 18:41 hc_orc119c.dat
      rw-rw----. 1 oracle oracle 1544 Aug 10 18:53 hc_orc12.dat
      rw-rw----. 1 oracle oracle 1544 Aug 10 19:25 hc_orcl.dat
      rw-rw----. 1 oracle oracle 3584 Aug 10 20:35 spfileorcl.ora
    4. Verify the contents of the spfile.
    5. If the pfile creation command is added in the RMAN script in the preceding step 10, then verify the newly created pfile in the $ORACLE_HOME/dbs directory.

      The following type of information appears on the console:

      rw-rw----. 1 oracle oracle 3584 Aug 10 20:35 spfileorcl.ora
      rw-r--r--. 1 oracle oracle 1111 Aug 10 20:35 initorcl.ora

      Verify the contents of the pfile, and update the new directory file structure for audit, recovery, and control file destination folders.

    6. Close the second SSH session.
  12. To shut down the Oracle instance, run the following command:
    shutdown immediate;

    The following type of information appears on the console:

    Oracle instance shut down
  13. To restart the Oracle instance with the restored spfile in the nomount mode, run the following command:
    startup nomount;

    To restart the Oracle instance with the newly created pfile in the nomount mode, run the following command:

    startup nomount pfile='$ORACLE_HOME/dbs/initorcl.ora';

    The following type of information appears on the console:

    connected to target database (not started)
    Oracle instance started
    
    Total System Global Area 3741318336 bytes
    Fixed Size 9141440 bytes
    Variable Size 788529152 bytes
    Database Buffers 2936012800 bytes
    Redo Buffers 7634944 bytes
  14. Restore the control file from the autobackup. For example:
    RMAN> set DBID=1575537735;
    executing command: SET DBID
    
    RMAN> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO './PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/%F';
    executing command: SET CONTROLFILE AUTOBACKUP FORMAT
    
    RMAN> run {
    2>
    3> ALLOCATE CHANNEL C1 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    4>
    5> ALLOCATE CHANNEL C2 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    6>
    7> ALLOCATE CHANNEL C3 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    8>
    9> ALLOCATE CHANNEL C4 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    10>
    11> restore controlfile from autobackup;
    12>
    13> }
    
    allocated channel: C1
    channel C1: SID=36 device type=SBT_TAPE
    channel C1: PowerProtect DD Boost API
    
    allocated channel: C2
    channel C2: SID=37 device type=SBT_TAPE
    channel C2: PowerProtect DD Boost API
    
    allocated channel: C3
    channel C3: SID=38 device type=SBT_TAPE 
    channel C3: PowerProtect DD Boost API 
    
    allocated channel: C4
    channel C4: SID=39 device type=SBT_TAPE
    channel C4: PowerProtect DD Boost API
    
    Starting restore at 07-JAN-22
    
    channel C1: looking for AUTOBACKUP on day: 20220107
    channel C1: AUTOBACKUP found: ./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/c-1617195089-20220107-05
    channel C2: looking for AUTOBACKUP on day: 20220107
    channel C2: skipped, AUTOBACKUP already found
    channel C3: looking for AUTOBACKUP on day: 20220107
    channel C3: skipped, AUTOBACKUP already found
    channel C4: looking for AUTOBACKUP on day: 20220107
    channel C4: skipped, AUTOBACKUP already found
    channel C1: restoring control file from AUTOBACKUP ./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/c-1617195089-20220107-05
    channel C1: control file restore from AUTOBACKUP complete
    output file name=/home/oracle/app/oracle/product/12.2.0/dbhome_1/dbs/cntrlorcl.dbf
    Finished restore at 07-JAN-22
    released channel: C1
    released channel: C2
    released channel: C3
    released channel: C4
    NOTE When autobackup is disabled, the control files and spfiles are backed up automatically as part of the database backup. The prefix Automated_controlfile is added in the control file names and Automated_spfile is added in the spfile names for easy identification. This feature helps with disaster recovery use cases.
  15. To mount the database, run the following command:
    RMAN> alter database mount;

    The following type of information appears on the console:

    Statement processed
  16. To restore the database, run the restore database command in Recovery Manager. For example:
    RMAN> run {
    2>
    3> ALLOCATE CHANNEL C1 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    4>
    5> ALLOCATE CHANNEL C2 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    6>
    7> ALLOCATE CHANNEL C3 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    8>
    9> ALLOCATE CHANNEL C4 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    10>
    11> restore database;
    12>
    13> }
    
    released channel: ORA DISK 1
    allocated channel: Cl
    channel C1: SID=25 device type=SBT_TAPE
    channel C1: PowerProtect DD Boost API
    
    allocated channel: C2
    channel C2: SID=40 device type=SBT_TAPE
    channel C2: PowerProtect DD Boost API
    
    allocated channel: C3
    channel C3: SID=28 device type=SBT_TAPE
    channel C3: PowerProtect DD Boost API
    
    allocated channel: C4
    channel C4: SID=29 device type=SBT_TAPE
    channel C4: PowerProtect DD Boost API 
    
    Starting restore at 07-JAN-22
    
    new media label is "s:10.125.214.227:/PLC82-blrv136h019-2882b" for piece "./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jb0illk6_1"
    new media label is "s:10.125.214.227:/PLC82-blrv136h019-2882b" for piece "./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_ja0illk6_1"
    new media label is "s:10.125.214.227:/PLC82-blrv136h019-2882b" for piece "./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_ji0illkr_1"
    new media label is "s:10.125.214.227:/PLC82-blrv136h019-2882b" for piece "./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jj0illkr_1"
    new media label is "s:10.125.214.227:/PLC82-blrv136h019-2882b" for piece "./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_je0illkl_1"
    new media label is "s:10.125.214.227:/PLC82-blrv136h019-2882b" for piece "./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jc0illk6_1"
    new media label is "s:10.125.214.227:/PLC82-blrv136h019-2882b" for piece "./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jh0illkq_1"
    new media label is "s:10.125.214.227:/PLC82-blrv136h019-2882b" for piece "./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jk0illks_1"
    channel C1: starting datafile backup set restore
    channel C1: specifying datafile(s) to restore from backup set
    channel C1: restoring datafile 00010 to /home/oracle/app/oracle/oradata/orcl/orclpdb/sysaux01.dbf
    channel C1: reading from backup piece ./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jc0illk6_1
    channel C2: starting datafile backup set restore
    channel C2: specifying datafile(s) to restore from backup set
    channel C2: restoring datafile 00001 to /home/oracle/app/oracle/oradata/orcl/system01.dbf
    channel C2: reading from backup piece ./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jb0illk6_1
    channel C3: starting datafile backup set restore
    channel C3: specifying datafile(s) to restore from backup set
    channel C3: restoring datafile 00009 to /home/oracle/app/oracle/oradata/orcl/orclpdb/system01.dbf
    channel C3: reading from backup piece ./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_je0illkl_1
    channel C4: starting datafile backup set restore
    channel C4: specifying datafile(s) to restore from backup set
    channel C4: restoring datafile 00007 to /home/oracle/app/oracle/oradata/orcl/users01.dbf
    channel C4: reading from backup piece ./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jj0illkr_1
    channel C4: piece handle=./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jj0illkr_1 tag=TAG20220107T054749
    channel C4: restored backup piece 1
    channel C4: restore complete, elapsed time: 00:00:01
    channel C4: starting datafile backup set restore
    channel C4: specifying datafile(s) to restore from backup set
    channel C4: restoring datafile 00004 to /home/oracle/app/oracle/oradata/orcl/undotbs01.dbf
    channel C4: reading from backup piece ./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_ji0illkr_1
    channel C4: piece handle=./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_ji0illkr_1 tag=TAG20220107T054749
    channel C4: restored backup piece 1
    channel C4: restore complete, elapsed time: 00:00:07
    channel C4: starting datafile backup set restore
    channel C4: specifying datafile(s) to restore from backup set
    channel C4: restoring datafile 00011 to /home/oracle/app/oracle/oradata/orcl/orclpdb/undotbs01.dbf
    channel C4: reading from backup piece ./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jh0illkq_1
    channel C3: piece handle=./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_je0illkl_1 tag=TAG20220107T054749
    channel C3: restored backup piece 1
    channel C3: restore complete, elapsed time: 00:00:09
    channel C3: starting datafile backup set restore
    channel C3: specifying datafile(s) to restore from backup set
    channel C3: restoring datafile 00012 to /home/oracle/app/oracle/oradata/orcl/orclpdb/users01.dbf
    channel C3: reading from backup piece ./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jk0illks_1
    channel C3: piece handle=./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jk0illks_1 tag=TAG20220107T054749
    channel C3: restored backup piece 1
    channel C3: restore complete, elapsed time: 00:00:01
    channel C3: starting datafile backup set restore
    channel C3: specifying datafile(s) to restore from backup set
    channel C3: restoring datafile 00003 to /home/oracle/app/oracle/oradata/orcl/sysaux01.dbf
    channel C3: reading from backup piece ./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_ja0illk6_1
    channel C4: piece handle=./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jh0illkq_1 tag=TAG20220107T054749
    channel C4: restored backup piece 1
    channel C4: restore complete, elapsed time: 00:00:06
    channel C1: piece handle=./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jc0illk6_1 tag=TAG20220107T054749
    channel C1: restored backup piece 1
    channel C1: restore complete, elapsed time: 00:00:18
    channel C2: piece handle=./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_jb0illk6_1 tag=TAG20220107T054749
    channel C2: restored backup piece 1
    channel C2: restore complete, elapsed time: 00:00:26
    channel C3: piece handle=./PLCTLP-d0af4f59-d810-4b6b-aef1-1f7a8709ca47/Automated_data_ORCL_1617195089_ja0illk6_1 tag=TAG20220107T054749
    channel C3: restored backup piece 1
    channel C3: restore complete, elapsed time: 00:00:25
    Finished restore at 07-JAN-22
    released channel: C1
    released channel: C2
    released channel: C3
    released channel: C4
  17. To prepare for database recovery, run the RMAN command list backup to obtain either the SCN or the log sequence number to which the database must be restored.

    Use SET UNTIL to specify the target time, restore point, SCN, or log sequence number for database point-in-time recovery. If specifying a time, then use the date format specified in the NLS_LANG and NLS_DATE_FORMAT environment variables.

    For example, the following output from the list backup command shows the log sequence number 494. To complete the database recovery, you need to restore the database to the log sequence number 494:

      SPFILE Included: Modification time: 17-AUG-20
      SPFILE db_unique_name: ORCL
      Control File Included: Ckp SCN: 3304523 Ckp time: 17-AUG-20
    
    BS Key Size     Device Type Elapsed Time Completion Time
    ------ -------- ----------- ------------ ---------------
    3397   256.00K  SBT_TAPE    00:00:00     17-AUG-20
           BP Key: 3397 Status: AVAILABLE Compressed: NO Tag: TAG20200817T141937
           Handle: ./Automated_arch_ORCL_<DBID>_nrv83dnp_1    Media: S:<DD_system>:/<storage_unit_name>/5c2914e2
    
      List of Archived Logs in backup set 3397
      Thrd Seq   Low SCN  Low Time  Next SCN Next Time
      ---- ----- -------- --------- -------- ---------
      1    494   3304486  17-AUG-20 3304775  17-AUG-20

    Record the final log sequence number.

    You can also use time expressions, restore points, or log sequence numbers to specify the SET UNTIL time. For example:

    SET UNTIL TIME 'Nov 15 2021 09:00:00';
    SET UNTIL SEQUENCE 9923;
    SET UNTIL SCN 1000; 
    SET UNTIL RESTORE POINT before_update;
    NOTE For more information about the procedures for restoring and recovering Oracle databases, refer to the Oracle Database Backup and Recovery User's Guide from the Oracle Help Center.
  18. To recover the database, run the recover database command in Recovery Manager.
    NOTE If you do not specify the log sequence number, SCN, or time expressions in the recover database command, the command output ends with an error message, such as follows:
    unable to find archived log
    archived log thread=1 sequence=495
    released channel: Cl
    released channel: C2
    released channel: C3
    released channel: C4
    RMAN-00571: =================================================
    RMAN-00569: ========== ERROR MESSAGE STACK FOLLOWS ==========
    RMAN-00571 :=================================================
    RMAN-03002: failure of recover command at 08/19/2020 15:38:00 
    RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 495 and starting SCN of 3304775

    In the following example, the recover database command specifies the sequence number to which the database is restored:

    RMAN> run {
    2>
    3> ALLOCATE CHANNEL C1 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    4>
    5> ALLOCATE CHANNEL C2 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    6>
    7> ALLOCATE CHANNEL C3 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    8>
    9> ALLOCATE CHANNEL C4 TYPE SBT TRACE 5 PARMS 'SBT_LIBRARY=/home/oracle/opt/dpsapps/rmanagent/lib/libddobk.so,SBT_PARMS=(RMAN_AGENT_HOME=/home/oracle/opt/dpsapps/rmanagent/,STORAGE_UNIT=/PLC82-blrv136h019-2882b, BACKUP_HOST=10.125.214.227, ORACLE_HOME= /home/oracle/app/oracle/product/12.2.0/dbhome_1)';
    10>
    11> recover database until sequence 495;
    12>
    13> }
    
    allocated channel: C1
    channel C1: SID=25 device type=SBT_TAPE
    channel C1: PowerProtect DD Boost API
    allocated channel: C2
    channel C2: SID=40 device type=SBT_TAPE
    channel C2: PowerProtect DD Boost API
    allocated channel: C3
    channel C3: SID=28 device type=SBT_TAPE
    channel C3: PowerProtect DD Boost API
    allocated channel: C4
    channel C4: SID=29 device type=SBT_TAPE
    channel C4: PowerProtect DD Boost API
    Starting recover at 07-JAN-22
    
    starting media recovery
    media recovery complete, elapsed time: 00:00:00
    Finished recover at 07-JAN-22
    released channel: C1
    released channel: C2
    released channel: C3
    released channel: C4

    If the operation completes without errors, then your database point-in-time recovery has succeeded. You can open the database as mentioned in the next step. However, if the operation completes with errors, you may have chosen the wrong target SCN or sequence. In that case, investigate the issue and determine a new target SCN or sequence, then repeat the database point-in-time recovery process.

  19. To create a new incarnation of the database, run the following command in Recovery Manager:
    alter database open resetlogs;
  20. To close the Recovery Manager, run the following command:
    exit
  21. To start the Recovery Manager and connect to the restored database, run the following command:
    rman target /
    Recovery Manager: Release 19.0.0.0.0 - Production on Mon Aug 10 19:15:06 2020
    Version 19.3.0.0.0
    
    Copyright (c) 1982, 2019, Oracle and/or its affiliates. All rights reserved.
    
    connected to target database: ORCL (DBID=<DBID>)
    
    RMAN>

    Verify that the database name and DBID are correct.

Next steps

After you perform a cross-restore to an alternate host:

  • Change the DBID of the restored database as described in Change the DBID of an Oracle instance.

    Ensure that the DBID is unique for each data center. Multiple Oracle databases with the same DBID cause a DBID collision.

  • Optionally, to remove the access to the production backups, remove the client registration from the lockbox as described in Remove a client registration from the lockbox.
  • After you have changed the DBID of the restored database, ensure that the Oracle SID value is removed from the parameter setting EXCLUDE_SID=<Oracle SID> in the configuration file $RMAN_AGENT_HOME/config/rman_agent.cfg.

Rate this content

Accurate
Useful
Easy to understand
Was this article helpful?
0/3000 characters
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please provide ratings (1-5 stars).
  Please select whether the article was helpful or not.
  Comments cannot contain these special characters: <>()\