Restore and recovering the Oracle database.


step 1: Start Database in nomount mode:
========================================================================
oracle@oratst0001 ():/u01/app/oracle/product/11204/dbs 0
$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Wed Dec 5 08:54:33 2018

Connected to an idle instance.

SQL> startup nomount pfile='pfile_virtual.ora';
ORA-32006: REMOTE_OS_AUTHENT initialization parameter has been deprecated
ORA-32006: LOG_ARCHIVE_START initialization parameter has been deprecated
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2260088 bytes
Variable Size             331350920 bytes
Database Buffers          729808896 bytes
Redo Buffers                5517312 bytes
SQL> 
=========================================================================
Step 2: Set DB ID and Restore control File:

set DBID 1142008032;
ALLOCATE CHANNEL C1 DEVICE TYPE SBT_TAPE PARMS 'BLKSIZE=1048576,
 SBT_LIBRARY=/opt/dpsapps/dbappagent/lib/lib64/libddboostora.so,
 SBT_PARMS=(CONFIG_FILE=/opt/dpsapps/dbappagent/config/oracle_ddbda.cfg)';
restore controlfile from 'c-1142008032-20181205-00';
release channel C1;

$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Dec 5 08:54:57 2018

connected to target database: VIRTUALD (not mounted)

RMAN> run
2> {
3> set DBID 1142008032;
4> ALLOCATE CHANNEL C1 DEVICE TYPE SBT_TAPE PARMS 'BLKSIZE=1048576,
   SBT_LIBRARY=/opt/dpsapps/dbappagent/lib/lib64/libddboostora.so,
   SBT_PARMS=(CONFIG_FILE=/opt/dpsapps/dbappagent/config/oracle_ddbda.cfg)';
5> restore controlfile from 'c-1142008032-20181205-00';
6> release channel C1;
7> }

executing command: SET DBID

using target database control file instead of recovery catalog
allocated channel: C1
channel C1: SID=19 device type=SBT_TAPE
channel C1: Database Application Agent Oracle v4.6.0.0

Starting restore at 05-DEC-18

channel C1: restoring control file
channel C1: restore complete, elapsed time: 00:00:03
output file name=/u01/app/oracle/oradata/virtuald/control01.ctl
Finished restore at 05-DEC-18

released channel: C1

RMAN>
=========================================================================
step 3: Mount Database:

RMAN> sql 'alter database mount';

sql statement: alter database mount

RMAN> 
================================================================
step 4: Restore Database:
oracle@oratst0001 ():/home/oracle/networker/DD_BOOST 0

ALLOCATE CHANNEL C1 DEVICE TYPE SBT_TAPE PARMS 'BLKSIZE=1048576,
 SBT_LIBRARY=/opt/dpsapps/dbappagent/lib/lib64/libddboostora.so,
 SBT_PARMS=(CONFIG_FILE=/opt/dpsapps/dbappagent/config/oracle_ddbda.cfg)';
 restore database; 
release channel C1; 
$ rman target /

Recovery Manager: Release 11.2.0.4.0 - Production on Wed Dec 5 09:03:47 2018

connected to target database: VIRTUALD (DBID=1142008032, not open)

RMAN> run
2> {
3> ALLOCATE CHANNEL C1 DEVICE TYPE SBT_TAPE PARMS 'BLKSIZE=1048576,
SBT_LIBRARY=/opt/dpsapps/dbappagent/lib/lib64/libddboostora.so,
SBT_PARMS=(CONFIG_FILE=/opt/dpsapps/dbappagent/config/oracle_ddbda.cfg)';
4> restore database;
5> release channel C1;
6> }

using target database control file instead of recovery catalog
allocated channel: C1
channel C1: SID=17 device type=SBT_TAPE
channel C1: Database Application Agent Oracle v4.6.0.0

Starting restore at 05-DEC-18
Starting implicit crosscheck backup at 05-DEC-18
Finished implicit crosscheck backup at 05-DEC-18

Starting implicit crosscheck copy at 05-DEC-18
Finished implicit crosscheck copy at 05-DEC-18

searching for all files in the recovery area
cataloging files...
cataloging done

List of Cataloged Files
=======================
File Name: 
/u01/app/oracle/virtauldb/fast_recovery_area/VIRTUALDB/archivelog/2018_12_05/o1_mf_1_19_g0hscc44_.arc


channel C1: starting datafile backup set restore
channel C1: specifying datafile(s) to restore from backup set
channel C1: restoring datafile 00001 to /u01/app/oracle/oradata/virtuald/system01.dbf
channel C1: restoring datafile 00002 to /u01/app/oracle/oradata/virtuald/sysaux01.dbf
channel C1: restoring datafile 00003 to /u01/app/oracle/oradata/virtuald/undotbs01.dbf
channel C1: reading from backup piece VIRTUALD_0btk0d3s_1_1
channel C1: piece handle=VIRTUALD_0btk0d3s_1_1 tag=VIRTUALD_HOT_30DAYS
channel C1: restored backup piece 1
channel C1: restore complete, elapsed time: 00:00:25
Finished restore at 05-DEC-18

released channel: C1

RMAN>
==================================================================
Step 5: Restore Archives:

Restore Archives
====================
ALLOCATE CHANNEL C1 DEVICE TYPE SBT_TAPE PARMS 'BLKSIZE=1048576,
SBT_LIBRARY=/opt/dpsapps/dbappagent/lib/lib64/libddboostora.so,
SBT_PARMS=(CONFIG_FILE=/opt/dpsapps/dbappagent/config/oracle_ddbda.cfg)';
4> restore archivelog all;
5> release channel C1;

restore archivelog from sequence 1 until sequence 18;
==========================================================
RMAN> list backup of archivelog all;


List of Backup Sets
===================


BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
5       59.00M     SBT_TAPE    00:00:01     05-DEC-18
        BP Key: 5   Status: AVAILABLE  Compressed: NO  
        Tag: TAG20181205T062407
        Handle: VIRTUALD_08tk04s8_1_1   
        Media: Database Application Agent/ddboost_test

  List of Archived Logs in backup set 5
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    7       170481     30-NOV-18 216468     05-DEC-18
  1    8       216468     05-DEC-18 217434     05-DEC-18
  1    9       217434     05-DEC-18 217440     05-DEC-18
  1    10      217440     05-DEC-18 217443     05-DEC-18
  1    11      217443     05-DEC-18 217524     05-DEC-18

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
6       59.00M     SBT_TAPE    00:00:02     05-DEC-18
        BP Key: 6   Status: AVAILABLE  Compressed: NO  
        Tag: TAG20181205T062549
        Handle: VIRTUALD_09tk04vd_1_1   
        Media: Database Application Agent/ddboost_test

  List of Archived Logs in backup set 6
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    7       170481     30-NOV-18 216468     05-DEC-18
  1    8       216468     05-DEC-18 217434     05-DEC-18
  1    9       217434     05-DEC-18 217440     05-DEC-18
  1    10      217440     05-DEC-18 217443     05-DEC-18
  1    11      217443     05-DEC-18 217524     05-DEC-18
  1    12      217524     05-DEC-18 217586     05-DEC-18

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
7       59.00M     SBT_TAPE    00:00:01     05-DEC-18
        BP Key: 7   Status: AVAILABLE  Compressed: NO  
        Tag: TAG20181205T062636
        Handle: VIRTUALD_0atk050s_1_1  
        Media: Database Application Agent/ddboost_test

  List of Archived Logs in backup set 7
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    7       170481     30-NOV-18 216468     05-DEC-18
  1    8       216468     05-DEC-18 217434     05-DEC-18
  1    9       217434     05-DEC-18 217440     05-DEC-18
  1    10      217440     05-DEC-18 217443     05-DEC-18
  1    11      217443     05-DEC-18 217524     05-DEC-18
  1    12      217524     05-DEC-18 217586     05-DEC-18
  1    13      217586     05-DEC-18 217629     05-DEC-18

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
9       1.00M      SBT_TAPE    00:00:00     05-DEC-18
        BP Key: 9   Status: AVAILABLE  Compressed: YES  
        Tag: VIRTUALD_HOT_30DAYS
        Handle: VIRTUALD_0ctk0d4c_1_1   
        Media: Database Application Agent/ddboost_test
        Keep: BACKUP_LOGS        Until: 04-JAN-19

  List of Archived Logs in backup set 9
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    15      221677     05-DEC-18 221691     05-DEC-18

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
11      3.00M      SBT_TAPE    00:00:02     05-DEC-18
        BP Key: 11   Status: AVAILABLE  Compressed: NO  
        Tag: TAG20181205T084908
        Handle: VIRTUALD_0etk0dc4_1_1   
        Media: Database Application Agent/ddboost_test

  List of Archived Logs in backup set 11
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    14      217629     05-DEC-18 221677     05-DEC-18
  1    15      221677     05-DEC-18 221691     05-DEC-18
  1    16      221691     05-DEC-18 221838     05-DEC-18
  1    17      221838     05-DEC-18 221854     05-DEC-18
  1    18      221854     05-DEC-18 221862     05-DEC-18

RMAN> run
2> {
3> ALLOCATE CHANNEL C1 DEVICE TYPE SBT_TAPE PARMS 'BLKSIZE=1048576,
SBT_LIBRARY=/opt/dpsapps/dbappagent/lib/lib64/libddboostora.so,
SBT_PARMS=(CONFIG_FILE=/opt/dpsapps/dbappagent/config/oracle_ddbda.cfg)';
4> restore archivelog from sequence 1 until sequence 18;
5> }

allocated channel: C1
channel C1: SID=19 device type=SBT_TAPE
channel C1: Database Application Agent Oracle v4.6.0.0

Starting restore at 05-DEC-18

channel C1: starting archived log restore to default destination
channel C1: restoring archived log
archived log thread=1 sequence=7
channel C1: restoring archived log
archived log thread=1 sequence=8
channel C1: restoring archived log
archived log thread=1 sequence=9
channel C1: restoring archived log
archived log thread=1 sequence=10
channel C1: restoring archived log
archived log thread=1 sequence=11
channel C1: restoring archived log
archived log thread=1 sequence=12
channel C1: restoring archived log
archived log thread=1 sequence=13
channel C1: reading from backup piece VIRTUALD_0atk050s_1_1
channel C1: piece handle=VIRTUALD_0atk050s_1_1 tag=TAG20181205T062636
channel C1: restored backup piece 1
channel C1: restore complete, elapsed time: 00:00:03
channel C1: starting archived log restore to default destination
channel C1: restoring archived log
archived log thread=1 sequence=14
channel C1: restoring archived log
archived log thread=1 sequence=15
channel C1: restoring archived log
archived log thread=1 sequence=16
channel C1: restoring archived log
archived log thread=1 sequence=17
channel C1: restoring archived log
archived log thread=1 sequence=18
channel C1: reading from backup piece VIRTUALD_0etk0dc4_1_1
channel C1: piece handle=VIRTUALD_0etk0dc4_1_1 tag=TAG20181205T084908
channel C1: restored backup piece 1
channel C1: restore complete, elapsed time: 00:00:01
Finished restore at 05-DEC-18
released channel: C1

RMAN>
========================================================
Step 6: Recover Database:
RMAN> recover database;

Starting recover at 05-DEC-18
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK

starting media recovery

archived log for thread 1 with sequence 15 is already on disk as file
 /u01/app/oracle/virtauldb/fast_recovery_area/VIRTUALDB/archivelog/2018_12_05/o1_mf_1_15_g0htylsb_.arc
archived log for thread 1 with sequence 16 is already on disk as file 
/u01/app/oracle/virtauldb/fast_recovery_area/VIRTUALDB/archivelog/2018_12_05/o1_mf_1_16_g0htylrz_.arc
archived log for thread 1 with sequence 17 is already on disk as file 
/u01/app/oracle/virtauldb/fast_recovery_area/VIRTUALDB/archivelog/2018_12_05/o1_mf_1_17_g0htylwd_.arc
archived log for thread 1 with sequence 18 is already on disk as file
/u01/app/oracle/virtauldb/fast_recovery_area/VIRTUALDB/archivelog/2018_12_05/o1_mf_1_18_g0htyltb_.arc
archived log for thread 1 with sequence 19 is already on disk as file
 /u01/app/oracle/oradata/virtuald/redo01.log
archived log for thread 1 with sequence 20 is already on disk as file
 /u01/app/oracle/oradata/virtuald/redo02.log
archived log file 
 name=/u01/app/oracle/virtauldb/fast_recovery_area/VIRTUALDB/archivelog/2018_12_05/o1_mf_1_15_g0htylsb_.arc
  thread=1 sequence=15
archived log file 
  name=/u01/app/oracle/virtauldb/fast_recovery_area/VIRTUALDB/archivelog/2018_12_05/o1_mf_1_16_g0htylrz_.arc
  thread=1 sequence=16
archived log file  
  name=/u01/app/oracle/virtauldb/fast_recovery_area/VIRTUALDB/archivelog/2018_12_05/o1_mf_1_17_g0htylwd_.arc
  thread=1 sequence=17
archived log file 
  name=/u01/app/oracle/virtauldb/fast_recovery_area/VIRTUALDB/archivelog/2018_12_05/o1_mf_1_18_g0htyltb_.arc
  thread=1 sequence=18
archived log file name=/u01/app/oracle/oradata/virtuald/redo01.log thread=1 sequence=19
archived log file name=/u01/app/oracle/oradata/virtuald/redo02.log thread=1 sequence=20
media recovery complete, elapsed time: 00:00:00
Finished recover at 05-DEC-18
RMAN>
=============================================
Step 7: Open Database with resetlogs:

RMAN> sql 'alter database open resetlogs';

sql statement: alter database open resetlogs

RMAN>

$ sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.4.0 Production on Wed Dec 5 09:31:31 2018

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name,log_mode,open_mode from v$database;

NAME      LOG_MODE     OPEN_MODE
--------- ------------ --------------------
VIRTUALD  ARCHIVELOG   READ WRITE
====================================================


See Also:

Oracle Database backup configurations.
Oracle DB COLD backup using DD Boost data domain
Oracle DB HOT backup using DD boost data domain
Oracle DB Archive backup using DD boost data domain
Restore Oracle database from Cold backup
Restore and recovering the Oracle database
https://support.oracle.com
http://oracle.com