Database 12c: RMAN Backup & Recovery of pluggable databases


RMAN Backup and Recovery operation have to be done at CDB level. For RMAN a PDB is just a bunch of datafiles.

Notice: If you want to restore a PDB from another CDB you have to restore the other CDB before and do an unplug an plug to transfer.

1. Backup of a PDB

RMAN> backup pluggable database pdb1 plus archivelog;
Starting backup at 11-JUL-13
 current log archived
 using channel ORA_DISK_1
 channel ORA_DISK_1: starting archived log backup set
 channel ORA_DISK_1: specifying archived log(s) in backup set
 input archived log thread=1 sequence=19 RECID=1 STAMP=820531423
 input archived log thread=1 sequence=20 RECID=2 STAMP=820531461
 input archived log thread=1 sequence=21 RECID=3 STAMP=820532613
 input archived log thread=1 sequence=22 RECID=4 STAMP=820532651
 input archived log thread=1 sequence=23 RECID=5 STAMP=820532930
 input archived log thread=1 sequence=24 RECID=6 STAMP=820533638
 input archived log thread=1 sequence=25 RECID=7 STAMP=820534921
 input archived log thread=1 sequence=26 RECID=8 STAMP=820535377
 channel ORA_DISK_1: starting piece 1 at 11-JUL-13
 channel ORA_DISK_1: finished piece 1 at 11-JUL-13
 piece handle=/opt/oracle/app/fast_recovery_area/CDB12C/backupset/2013_07_11/o1_mf_annnn_TAG20130711T222937_8xy5fkdh_.bkp tag=TAG20130711T222937 comment=NONE
 channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
 Finished backup at 11-JUL-13
Starting backup at 11-JUL-13
 using channel ORA_DISK_1
 channel ORA_DISK_1: starting full datafile backup set
 channel ORA_DISK_1: specifying datafile(s) in backup set
 input datafile file number=00050 name=/opt/oracle/app/oradata/CDB12C/E1433B62351A0F0DE0430100007F3E51/datafile/o1_mf_sysaux_8xy5brt3_.dbf
 input datafile file number=00049 name=/opt/oracle/app/oradata/CDB12C/E1433B62351A0F0DE0430100007F3E51/datafile/o1_mf_system_8xy5bq9w_.dbf
 channel ORA_DISK_1: starting piece 1 at 11-JUL-13
 channel ORA_DISK_1: finished piece 1 at 11-JUL-13
 piece handle=/opt/oracle/app/fast_recovery_area/CDB12C/E1433B62351A0F0DE0430100007F3E51/backupset/2013_07_11/o1_mf_nnndf_TAG20130711T222938_8xy5flmr_.bkp tag=TAG20130711T222938 comment=NONE
 channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
 Finished backup at 11-JUL-13
Starting backup at 11-JUL-13
 current log archived
 using channel ORA_DISK_1
 channel ORA_DISK_1: starting archived log backup set
 channel ORA_DISK_1: specifying archived log(s) in backup set
 input archived log thread=1 sequence=27 RECID=9 STAMP=820535385
 channel ORA_DISK_1: starting piece 1 at 11-JUL-13
 channel ORA_DISK_1: finished piece 1 at 11-JUL-13
 piece handle=/opt/oracle/app/fast_recovery_area/CDB12C/backupset/2013_07_11/o1_mf_annnn_TAG20130711T222945_8xy5fsxz_.bkp tag=TAG20130711T222945 comment=NONE
 channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
 Finished backup at 11-JUL-13
Starting Control File and SPFILE Autobackup at 11-JUL-13
 piece handle=/opt/oracle/app/fast_recovery_area/CDB12C/autobackup/2013_07_11/o1_mf_s_820535387_8xy5fvdw_.bkp comment=NONE
 Finished Control File and SPFILE Autobackup at 11-JUL-13

As you can see is a backup of an PDB just a backup of the datafiles and the CDB archivelogs.

2. Full Restore & Recover of PDBs

RMAN> alter pluggable database pdb1 close;

Statement processed

RMAN> run {
2> restore pluggable database pdb1;
3> recover pluggable database pdb1;
4> }

Starting restore at 11-JUL-13
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00049 to /opt/oracle/app/oradata/CDB12C/E1433B62351A0F0DE0430100007F3E51/datafile/o1_mf_system_8xy5bq9w_.dbf
channel ORA_DISK_1: restoring datafile 00050 to /opt/oracle/app/oradata/CDB12C/E1433B62351A0F0DE0430100007F3E51/datafile/o1_mf_sysaux_8xy5brt3_.dbf
channel ORA_DISK_1: reading from backup piece /opt/oracle/app/fast_recovery_area/CDB12C/E1433B62351A0F0DE0430100007F3E51/backupset/2013_07_11/o1_mf_nnndf_TAG20130711T222938_8xy5flmr_.bkp
channel ORA_DISK_1: piece handle=/opt/oracle/app/fast_recovery_area/CDB12C/E1433B62351A0F0DE0430100007F3E51/backupset/2013_07_11/o1_mf_nnndf_TAG20130711T222938_8xy5flmr_.bkp tag=TAG20130711T222938
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 11-JUL-13

Starting recover at 11-JUL-13
using channel ORA_DISK_1

starting media recovery
media recovery complete, elapsed time: 00:00:00

Finished recover at 11-JUL-13

RMAN> alter pluggable database pdb1 open;

Statement processed

RMAN>

3. PDB Point in time Recovery (PITR)

PDB PITR is in real mutible Tablespace  point-in-time recovery (TPITR). RMAN is triggering the PITR transparently. After all you have to open the pdb with “alter pluggable database open resetlogs“.

RMAN> alter pluggable database pdb1 close;

Statement processed

RMAN> run {
2> set until time "to_date('23:00 11-07-2013','hh24:mi dd-mm-yyyy')";
3> restore pluggable database pdb1;
4> recover pluggable database pdb1;
5> }

executing command: SET until clause

Starting restore at 11-JUL-13
using channel ORA_DISK_1

channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00049 to /opt/oracle/app/oradata/CDB12C/E1433B62351A0F0DE0430100007F3E51/datafile/o1_mf_system_8xy5bq9w_.dbf
channel ORA_DISK_1: restoring datafile 00050 to /opt/oracle/app/oradata/CDB12C/E1433B62351A0F0DE0430100007F3E51/datafile/o1_mf_sysaux_8xy5brt3_.dbf
channel ORA_DISK_1: reading from backup piece /opt/oracle/app/fast_recovery_area/CDB12C/E1433B62351A0F0DE0430100007F3E51/backupset/2013_07_11/o1_mf_nnndf_TAG20130711T222938_8xy5flmr_.bkp
channel ORA_DISK_1: piece handle=/opt/oracle/app/fast_recovery_area/CDB12C/E1433B62351A0F0DE0430100007F3E51/backupset/2013_07_11/o1_mf_nnndf_TAG20130711T222938_8xy5flmr_.bkp tag=TAG20130711T222938
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
Finished restore at 11-JUL-13

Starting recover at 11-JUL-13
current log archived
using channel ORA_DISK_1
RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time

List of tablespaces expected to have UNDO segments
Tablespace SYSTEM
Tablespace UNDOTBS1

Creating automatic instance, with SID='qzgF'

initialization parameters used for automatic instance:
db_name=CDB12C
db_unique_name=qzgF_pitr_pdb1_CDB12C
compatible=12.1.0.0.0
db_block_size=8192
db_files=200
sga_target=1G
processes=80
diagnostic_dest=/opt/oracle/app
#No auxiliary destination in use
enable_pluggable_database=true
_clone_one_pdb_recovery=true
control_files=/opt/oracle/app/fast_recovery_area/CDB12C/controlfile/o1_mf_8xy7pxl8_.ctl
#No auxiliary parameter file used

starting up automatic instance CDB12C

Oracle instance started

Total System Global Area 1068937216 bytes

Fixed Size 2296576 bytes
Variable Size 293602560 bytes
Database Buffers 767557632 bytes
Redo Buffers 5480448 bytes
Automatic instance created

contents of Memory Script:
{
# set requested point in time
set until time "to_date('23:00 11-07-2013','hh24:mi dd-mm-yyyy')";
# restore the controlfile
restore clone controlfile;
# mount the controlfile
sql clone 'alter database mount clone database';
}
executing Memory Script

executing command: SET until clause

Starting restore at 11-JUL-13
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: SID=111 device type=DISK

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: restoring control file
channel ORA_AUX_DISK_1: reading from backup piece /opt/oracle/app/fast_recovery_area/CDB12C/autobackup/2013_07_11/o1_mf_s_820535387_8xy5fvdw_.bkp
channel ORA_AUX_DISK_1: piece handle=/opt/oracle/app/fast_recovery_area/CDB12C/autobackup/2013_07_11/o1_mf_s_820535387_8xy5fvdw_.bkp tag=TAG20130711T222947
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
output file name=/opt/oracle/app/fast_recovery_area/CDB12C/controlfile/o1_mf_8xy7pxl8_.ctl
Finished restore at 11-JUL-13

sql statement: alter database mount clone database

contents of Memory Script:
{
# set requested point in time
set until time "to_date('23:00 11-07-2013','hh24:mi dd-mm-yyyy')";
# switch to valid datafilecopies
switch clone datafile 49 to datafilecopy 
 "/opt/oracle/app/oradata/CDB12C/E1433B62351A0F0DE0430100007F3E51/datafile/o1_mf_system_8xy5bq9w_.dbf";
switch clone datafile 50 to datafilecopy 
 "/opt/oracle/app/oradata/CDB12C/E1433B62351A0F0DE0430100007F3E51/datafile/o1_mf_sysaux_8xy5brt3_.dbf";
# set destinations for recovery set and auxiliary set datafiles
set newname for datafile 1 to 
 "/opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_system_8xy7qcfz_.dbf";
set newname for datafile 4 to 
 "/opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_undotbs1_8xy7qch4_.dbf";
set newname for datafile 3 to 
 "/opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_sysaux_8xy7qcj0_.dbf";
set newname for datafile 6 to 
 "/opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_users_8xy7qkcn_.dbf";
# restore the tablespaces in the recovery set and the auxiliary set
restore clone datafile 1, 4, 3, 6;
switch clone datafile all;
}
executing Memory Script

executing command: SET until clause

datafile 49 switched to datafile copy
input datafile copy RECID=7 STAMP=820537745 file name=/opt/oracle/app/oradata/CDB12C/E1433B62351A0F0DE0430100007F3E51/datafile/o1_mf_system_8xy5bq9w_.dbf

datafile 50 switched to datafile copy
input datafile copy RECID=8 STAMP=820537745 file name=/opt/oracle/app/oradata/CDB12C/E1433B62351A0F0DE0430100007F3E51/datafile/o1_mf_sysaux_8xy5brt3_.dbf

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

executing command: SET NEWNAME

Starting restore at 11-JUL-13
using channel ORA_AUX_DISK_1

channel ORA_AUX_DISK_1: starting datafile backup set restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_AUX_DISK_1: restoring datafile 00001 to /opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_system_8xy7qcfz_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00004 to /opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_undotbs1_8xy7qch4_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00003 to /opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_sysaux_8xy7qcj0_.dbf
channel ORA_AUX_DISK_1: restoring datafile 00006 to /opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_users_8xy7qkcn_.dbf
channel ORA_AUX_DISK_1: reading from backup piece /opt/oracle/app/fast_recovery_area/CDB12C/backupset/2013_07_11/o1_mf_nnndf_TAG20130711T214335_8xy2q7cg_.bkp
channel ORA_AUX_DISK_1: piece handle=/opt/oracle/app/fast_recovery_area/CDB12C/backupset/2013_07_11/o1_mf_nnndf_TAG20130711T214335_8xy2q7cg_.bkp tag=TAG20130711T214335
channel ORA_AUX_DISK_1: restored backup piece 1
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:15
Finished restore at 11-JUL-13

datafile 1 switched to datafile copy
input datafile copy RECID=13 STAMP=820537760 file name=/opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_system_8xy7qcfz_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=14 STAMP=820537760 file name=/opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_undotbs1_8xy7qch4_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=15 STAMP=820537760 file name=/opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_sysaux_8xy7qcj0_.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=16 STAMP=820537761 file name=/opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_users_8xy7qkcn_.dbf

contents of Memory Script:
{
# set requested point in time
set until time "to_date('23:00 11-07-2013','hh24:mi dd-mm-yyyy')";
# online the datafiles restored or switched
sql clone "alter database datafile 1 online";
sql clone "alter database datafile 4 online";
sql clone "alter database datafile 3 online";
sql clone 'PDB1' "alter database datafile 
 49 online";
sql clone 'PDB1' "alter database datafile 
 50 online";
sql clone "alter database datafile 6 online";
# recover pdb
recover clone database tablespace "SYSTEM", "UNDOTBS1", "SYSAUX", "USERS" pluggable database 
 'PDB1' delete archivelog;
sql clone 'alter database open read only';
plsql <<<begin
 add_dropped_ts;
end; >>>;
plsql <<<begin
 save_pdb_clean_scn;
end; >>>;
# shutdown clone before import
shutdown clone abort
plsql <<<begin
 pdbpitr_inspect(pdbname => 'PDB1');
end; >>>;
}
executing Memory Script

executing command: SET until clause

sql statement: alter database datafile 1 online

sql statement: alter database datafile 4 online

sql statement: alter database datafile 3 online

sql statement: alter database datafile 49 online

sql statement: alter database datafile 50 online

sql statement: alter database datafile 6 online

Starting recover at 11-JUL-13
using channel ORA_AUX_DISK_1

starting media recovery

archived log for thread 1 with sequence 22 is already on disk as file /opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_22_8xy2rcsv_.arc
archived log for thread 1 with sequence 23 is already on disk as file /opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_23_8xy3126w_.arc
archived log for thread 1 with sequence 24 is already on disk as file /opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_24_8xy3q6bj_.arc
archived log for thread 1 with sequence 25 is already on disk as file /opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_25_8xy4z91m_.arc
archived log for thread 1 with sequence 26 is already on disk as file /opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_26_8xy5fk5j_.arc
archived log for thread 1 with sequence 27 is already on disk as file /opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_27_8xy5fsrc_.arc
archived log for thread 1 with sequence 28 is already on disk as file /opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_28_8xy7pxf9_.arc
archived log file name=/opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_22_8xy2rcsv_.arc thread=1 sequence=22
archived log file name=/opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_23_8xy3126w_.arc thread=1 sequence=23
archived log file name=/opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_24_8xy3q6bj_.arc thread=1 sequence=24
archived log file name=/opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_25_8xy4z91m_.arc thread=1 sequence=25
archived log file name=/opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_26_8xy5fk5j_.arc thread=1 sequence=26
archived log file name=/opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_27_8xy5fsrc_.arc thread=1 sequence=27
archived log file name=/opt/oracle/app/fast_recovery_area/CDB12C/archivelog/2013_07_11/o1_mf_1_28_8xy7pxf9_.arc thread=1 sequence=28
media recovery complete, elapsed time: 00:00:07
Finished recover at 11-JUL-13

sql statement: alter database open read only

Oracle instance shut down

Removing automatic instance
Automatic instance removed
auxiliary instance file /opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_sysaux_8xy7qcj0_.dbf deleted
auxiliary instance file /opt/oracle/app/fast_recovery_area/CDB12C/controlfile/o1_mf_8xy7pxl8_.ctl deleted
Finished recover at 11-JUL-13

RMAN> alter pluggable database pdb1 open;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of sql statement command at 07/11/2013 23:09:38
ORA-01113: file 50 needs media recovery
ORA-01110: data file 50: '/opt/oracle/app/oradata/CDB12C/E1433B62351A0F0DE0430100007F3E51/datafile/o1_mf_sysaux_8xy5brt3_.dbf'

RMAN> alter pluggable database pdb1 open resetlogs;

Statement processed

RMAN>

Per default “Fast Recovery Area” is used for auxiliary datafiles, if FRA is configured.

datafile 1 switched to datafile copy
input datafile copy RECID=13 STAMP=820537760 file name=/opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_system_8xy7qcfz_.dbf
datafile 4 switched to datafile copy
input datafile copy RECID=14 STAMP=820537760 file name=/opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_undotbs1_8xy7qch4_.dbf
datafile 3 switched to datafile copy
input datafile copy RECID=15 STAMP=820537760 file name=/opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_sysaux_8xy7qcj0_.dbf
datafile 6 switched to datafile copy
input datafile copy RECID=16 STAMP=820537761 file name=/opt/oracle/app/fast_recovery_area/CDB12C/datafile/o1_mf_users_8xy7qkcn_.dbf

If there is not enough space it is possible to use another storage area:

recover pluggable database pdb1 auxiliary destination='/stage/pdb1';

13 thoughts on “Database 12c: RMAN Backup & Recovery of pluggable databases

  1. I tried the similar script but it is failing with RMAN-03002: failure of recover command at 05/01/2014 00:01:25

    RMAN-03015: error occurred in stored script Memory Script

    RMAN-06034: at least 1 channel must be allocated to execute this command

    Please help.

    • hi,
      ok i’m not able to reproduce your problem. Please provide your rman configuration (show all;) and your whole script you have exexuted.

      Rgds,
      Daniel

      • Hi,
        Thanks for your reply. Here is the script that I am running.
        RUN {
        ALLOCATE CHANNEL ch0 TYPE ‘SBT_TAPE’;
        RESTORE PLUGGABLE DATABASE ‘PDBTEST’ UNTIL SCN 10090975;
        RECOVER PLUGGABLE DATABASE ‘PDBTEST’ UNTIL SCN 10090975;
        ALTER PLUGGABLE DATABASE PDBTEST OPEN RESETLOGS;
        RELEASE CHANNEL ch0;
        }
        using target database control file instead of recovery catalog
        allocated channel: ch0
        channel ch0: SID=261 device type=SBT_TAPE
        channel ch0: xxxx
        sent command to channel: ch0
        Starting restore at 30-APR-14
        channel ch0: starting datafile backup set restore
        channel ch0: specifying datafile(s) to restore from backup set
        channel ch0: restoring datafile 00016 to C:\APP\ORAUSER\ORADATA\ORCL\PDBTEST\SYSTEM01.DBF
        channel ch0: restoring datafile 00017 to C:\APP\ORAUSER\ORADATA\ORCL\PDBTEST\SYSAUX01.DBF

        channel ch0: restoring datafile 00018 to C:\APP\ORAUSER\ORADATA\ORCL\PDBTEST\PDBTEST_USERS01.DBF

        channel ch0: restoring datafile 00019 to C:\APP\ORAUSER\ORADATA\ORCL\PDBTEST\FILE25.DAT

        channel ch0: restoring datafile 00020 to C:\APP\ORAUSER\ORADATA\ORCL\PDBTEST\FILE17.DAT
        channel ch0: reading from backup piece xx_alp71q76_1_1
        channel ch0: piece handle=xx_alp71q76_1_1 tag=TAG20140430T161918

        channel ch0: restored backup piece 1
        channel ch0: restore complete, elapsed time: 00:01:15
        Finished restore at 30-APR-14

        Starting recover at 30-APR-14
        RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time
        List of tablespaces expected to have UNDO segments

        Tablespace SYSTEM
        Tablespace UNDOTBS1
        Creating automatic instance, with SID=’lsqd’

        initialization parameters used for automatic instance:

        db_name=ORCL

        db_unique_name=lsqd_pitr_PDBTEST_ORCL

        compatible=12.1.0.0.0

        db_block_size=8192

        db_files=200

        sga_target=1G

        processes=80

        diagnostic_dest=C:\APP\ORAUSER

        #No auxiliary destination in use

        enable_pluggable_database=true

        _clone_one_pdb_recovery=true

        control_files=C:\APP\ORAUSER\FAST_RECOVERY_AREA\ORCL\CONTROLFILE\O1_MF_9P2J96MP_.CTL

        #No auxiliary parameter file used

        starting up automatic instance ORCL

        Oracle instance started

        Total System Global Area 1068937216 bytes

        Fixed Size 2410864 bytes

        Variable Size 281020048 bytes

        Database Buffers 780140544 bytes

        Redo Buffers 5365760 bytes

        Automatic instance created

        contents of Memory Script:

        {

        # set requested point in time

        set until scn 10090975;

        # restore the controlfile

        restore clone controlfile;

        # mount the controlfile

        sql clone ‘alter database mount clone database’;

        }

        executing Memory Script

        executing command: SET until clause

        Starting restore at 01-MAY-14

        Removing automatic instance

        shutting down automatic instance

        Oracle instance shut down

        Automatic instance removed

        released channel: ch0

        RMAN-00571: ===========================================================RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============RMAN-00571:===========================================================
        RMAN-03002: failure of recover command at 05/01/2014 00:01:25
        RMAN-03015: error occurred in stored script Memory Script
        RMAN-06034: at least 1 channel must be allocated to execute this command

        I have not configured any of the config parameters of RMAN. They are all default.
        Please help.
        Thanks n Regards,

      • Hi,
        ok i’vh equipped my testenvironment and was able to reproduce your problem, with the following statement:

        RUN {
          set until time "to_date('18:55 08-05-2014','hh24:mi dd-mm-yyyy')";
          allocate channel ch01 device type disk;
          RESTORE PLUGGABLE DATABASE PDB1;
          RECOVER PLUGGABLE DATABASE PDB1;
          RELEASE CHANNEL ch00;
        }
        
        ...
        
        released channel: ch00
        RMAN-00571: ===========================================================
        RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
        RMAN-00571: ===========================================================
        RMAN-03002: failure of recover command at 05/08/2014 19:03:21
        RMAN-03015: error occurred in stored script Memory Script
        RMAN-06034: at least 1 channel must be allocated to execute this command
        

        The problem is nothing new and already documented in RMAN-06034 during TSPITR (Doc ID 467189.1). To solve you issue you have to avoid channel explicit channel allocations and configure your environment probably. Here my example configuration:

        CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
        CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS="SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/opt/oracle/backup/CDB1)";
        

        or complete

        RMAN> show all;
        
        RMAN configuration parameters for database with db_unique_name CDB1 are:
        CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
        CONFIGURE BACKUP OPTIMIZATION OFF; # default
        CONFIGURE DEFAULT DEVICE TYPE TO 'SBT_TAPE';
        CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
        CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE SBT_TAPE TO '%F'; # default
        CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
        CONFIGURE DEVICE TYPE SBT_TAPE PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
        CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
        CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
        CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
        CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE SBT_TAPE TO 1; # default
        CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
        CONFIGURE CHANNEL DEVICE TYPE 'SBT_TAPE' PARMS  "SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/opt/oracle/backup/CDB1)";
        CONFIGURE MAXSETSIZE TO UNLIMITED; # default
        CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
        CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
        CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
        CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
        CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
        CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/product/12.1.0.1/dbhome_1/dbs/snapcf_CDB1.f'; # default
        

        Afterwards you should be able to do pdb restore (which is nothing else than an tablespace point in time recovery), here the whole output:

        RUN {
          set until time "to_date('18:55 08-05-2014','hh24:mi dd-mm-yyyy')";
          RESTORE PLUGGABLE DATABASE PDB1;
          RECOVER PLUGGABLE DATABASE PDB1;
        5> }
        
        executing command: SET until clause
        
        Starting restore at 2014-05-08 19:14:20
        allocated channel: ORA_SBT_TAPE_1
        channel ORA_SBT_TAPE_1: SID=244 device type=SBT_TAPE
        channel ORA_SBT_TAPE_1: WARNING: Oracle Test Disk API
        allocated channel: ORA_DISK_1
        channel ORA_DISK_1: SID=416 device type=DISK
        
        skipping datafile 8; already restored to file /opt/oracle/oradata/CDB1/F8074FF2BCE01324E0430100007F9965/datafile/o1_mf_system_9ot22fph_.dbf
        skipping datafile 9; already restored to file /opt/oracle/oradata/CDB1/F8074FF2BCE01324E0430100007F9965/datafile/o1_mf_sysaux_9ot22fp8_.dbf
        skipping datafile 10; already restored to file /opt/oracle/oradata/CDB1/F8074FF2BCE01324E0430100007F9965/datafile/o1_mf_users_9ot22lwt_.dbf
        Finished restore at 2014-05-08 19:14:21
        
        Starting recover at 2014-05-08 19:14:21
        using channel ORA_SBT_TAPE_1
        using channel ORA_DISK_1
        RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time
        
        List of tablespaces expected to have UNDO segments
        Tablespace SYSTEM
        Tablespace UNDOTBS1
        
        Creating automatic instance, with SID='ynkl'
        
        initialization parameters used for automatic instance:
        db_name=CDB1
        db_unique_name=ynkl_pitr_PDB1_CDB1
        compatible=12.1.0.0.0
        db_block_size=8192
        db_files=200
        sga_target=1G
        processes=80
        diagnostic_dest=/opt/oracle
        #No auxiliary destination in use
        enable_pluggable_database=true
        _clone_one_pdb_recovery=true
        control_files=/opt/oracle/fast_recovery_area/CDB1/controlfile/o1_mf_9pqgvf5s_.ctl
        #No auxiliary parameter file used
        
        
        starting up automatic instance CDB1
        
        
        Oracle instance started
        
        Total System Global Area    1068937216 bytes
        
        Fixed Size                     2296576 bytes
        Variable Size                293602560 bytes
        Database Buffers             767557632 bytes
        Redo Buffers                   5480448 bytes
        Automatic instance created
        
        contents of Memory Script:
        {
        # set requested point in time
        set until  time "to_date('18:55 08-05-2014','hh24:mi dd-mm-yyyy')";
        # restore the controlfile
        restore clone controlfile;
        # mount the controlfile
        sql clone 'alter database mount clone database';
        }
        executing Memory Script
        
        executing command: SET until clause
        
        Starting restore at 2014-05-08 19:14:33
        allocated channel: ORA_AUX_SBT_TAPE_1
        channel ORA_AUX_SBT_TAPE_1: SID=128 device type=SBT_TAPE
        channel ORA_AUX_SBT_TAPE_1: WARNING: Oracle Test Disk API
        allocated channel: ORA_AUX_DISK_1
        channel ORA_AUX_DISK_1: SID=127 device type=DISK
        
        channel ORA_AUX_SBT_TAPE_1: starting datafile backup set restore
        channel ORA_AUX_SBT_TAPE_1: restoring control file
        channel ORA_AUX_SBT_TAPE_1: reading from backup piece c-819715819-20140508-05
        channel ORA_AUX_SBT_TAPE_1: piece handle=c-819715819-20140508-05 tag=TAG20140508T185056
        channel ORA_AUX_SBT_TAPE_1: restored backup piece 1
        channel ORA_AUX_SBT_TAPE_1: restore complete, elapsed time: 00:00:01
        output file name=/opt/oracle/fast_recovery_area/CDB1/controlfile/o1_mf_9pqgvf5s_.ctl
        Finished restore at 2014-05-08 19:14:34
        
        sql statement: alter database mount clone database
        
        contents of Memory Script:
        {
        # set requested point in time
        set until  time "to_date('18:55 08-05-2014','hh24:mi dd-mm-yyyy')";
        # switch to valid datafilecopies
        switch clone datafile  8 to datafilecopy 
         "/opt/oracle/oradata/CDB1/F8074FF2BCE01324E0430100007F9965/datafile/o1_mf_system_9ot22fph_.dbf";
        switch clone datafile  9 to datafilecopy 
         "/opt/oracle/oradata/CDB1/F8074FF2BCE01324E0430100007F9965/datafile/o1_mf_sysaux_9ot22fp8_.dbf";
        switch clone datafile  10 to datafilecopy 
         "/opt/oracle/oradata/CDB1/F8074FF2BCE01324E0430100007F9965/datafile/o1_mf_users_9ot22lwt_.dbf";
        # set destinations for recovery set and auxiliary set datafiles
        set newname for datafile  1 to 
         "/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_system_9pqgvs7n_.dbf";
        set newname for datafile  4 to 
         "/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_undotbs1_9pqgvs8d_.dbf";
        set newname for datafile  3 to 
         "/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_sysaux_9pqgvs9r_.dbf";
        set newname for datafile  6 to 
         "/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_users_9pqgvzhx_.dbf";
        # restore the tablespaces in the recovery set and the auxiliary set
        restore clone datafile  1, 4, 3, 6;
        switch clone datafile all;
        }
        executing Memory Script
        
        executing command: SET until clause
        
        datafile 8 switched to datafile copy
        input datafile copy RECID=3 STAMP=847048479 file name=/opt/oracle/oradata/CDB1/F8074FF2BCE01324E0430100007F9965/datafile/o1_mf_system_9ot22fph_.dbf
        
        datafile 9 switched to datafile copy
        input datafile copy RECID=4 STAMP=847048479 file name=/opt/oracle/oradata/CDB1/F8074FF2BCE01324E0430100007F9965/datafile/o1_mf_sysaux_9ot22fp8_.dbf
        
        datafile 10 switched to datafile copy
        input datafile copy RECID=5 STAMP=847048479 file name=/opt/oracle/oradata/CDB1/F8074FF2BCE01324E0430100007F9965/datafile/o1_mf_users_9ot22lwt_.dbf
        
        executing command: SET NEWNAME
        
        executing command: SET NEWNAME
        
        executing command: SET NEWNAME
        
        executing command: SET NEWNAME
        
        Starting restore at 2014-05-08 19:14:39
        using channel ORA_AUX_SBT_TAPE_1
        using channel ORA_AUX_DISK_1
        
        channel ORA_AUX_SBT_TAPE_1: starting datafile backup set restore
        channel ORA_AUX_SBT_TAPE_1: specifying datafile(s) to restore from backup set
        channel ORA_AUX_SBT_TAPE_1: restoring datafile 00001 to /opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_system_9pqgvs7n_.dbf
        channel ORA_AUX_SBT_TAPE_1: restoring datafile 00004 to /opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_undotbs1_9pqgvs8d_.dbf
        channel ORA_AUX_SBT_TAPE_1: restoring datafile 00003 to /opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_sysaux_9pqgvs9r_.dbf
        channel ORA_AUX_SBT_TAPE_1: restoring datafile 00006 to /opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_users_9pqgvzhx_.dbf
        channel ORA_AUX_SBT_TAPE_1: reading from backup piece 09p7pq7t_1_1
        channel ORA_AUX_SBT_TAPE_1: piece handle=09p7pq7t_1_1 tag=TAG20140508T184829
        channel ORA_AUX_SBT_TAPE_1: restored backup piece 1
        channel ORA_AUX_SBT_TAPE_1: restore complete, elapsed time: 00:00:07
        Finished restore at 2014-05-08 19:14:47
        
        datafile 1 switched to datafile copy
        input datafile copy RECID=10 STAMP=847048487 file name=/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_system_9pqgvs7n_.dbf
        datafile 4 switched to datafile copy
        input datafile copy RECID=11 STAMP=847048487 file name=/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_undotbs1_9pqgvs8d_.dbf
        datafile 3 switched to datafile copy
        input datafile copy RECID=12 STAMP=847048487 file name=/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_sysaux_9pqgvs9r_.dbf
        datafile 6 switched to datafile copy
        input datafile copy RECID=13 STAMP=847048487 file name=/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_users_9pqgvzhx_.dbf
        
        contents of Memory Script:
        {
        # set requested point in time
        set until  time "to_date('18:55 08-05-2014','hh24:mi dd-mm-yyyy')";
        # online the datafiles restored or switched
        sql clone "alter database datafile  1 online";
        sql clone "alter database datafile  4 online";
        sql clone "alter database datafile  3 online";
        sql clone 'PDB1' "alter database datafile 
         8 online";
        sql clone 'PDB1' "alter database datafile 
         9 online";
        sql clone 'PDB1' "alter database datafile 
         10 online";
        sql clone "alter database datafile  6 online";
        # recover pdb
        recover clone database tablespace  "SYSTEM", "UNDOTBS1", "SYSAUX", "USERS" pluggable database 
         'PDB1'   delete archivelog;
        sql clone 'alter database open read only';
        plsql <<>>;
        plsql <<>>;
        # shutdown clone before import
        shutdown clone abort
        plsql <<  'PDB1');
        end; >>>;
        }
        executing Memory Script
        
        executing command: SET until clause
        
        sql statement: alter database datafile  1 online
        
        sql statement: alter database datafile  4 online
        
        sql statement: alter database datafile  3 online
        
        sql statement: alter database datafile  8 online
        
        sql statement: alter database datafile  9 online
        
        sql statement: alter database datafile  10 online
        
        sql statement: alter database datafile  6 online
        
        Starting recover at 2014-05-08 19:14:47
        using channel ORA_AUX_SBT_TAPE_1
        using channel ORA_AUX_DISK_1
        
        starting media recovery
        
        channel ORA_SBT_TAPE_1: starting archived log restore to default destination
        channel ORA_SBT_TAPE_1: restoring archived log
        archived log thread=1 sequence=24
        channel ORA_SBT_TAPE_1: reading from backup piece 0dp7pq89_1_1
        channel ORA_SBT_TAPE_1: piece handle=0dp7pq89_1_1 tag=TAG20140508T184840
        channel ORA_SBT_TAPE_1: restored backup piece 1
        channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:01
        channel ORA_SBT_TAPE_1: starting archived log restore to default destination
        channel ORA_SBT_TAPE_1: restoring archived log
        archived log thread=1 sequence=25
        channel ORA_SBT_TAPE_1: reading from backup piece 0fp7pqcf_1_1
        archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_05_08/o1_mf_1_24_9pqgw8cq_.arc thread=1 sequence=24
        channel clone_default: deleting archived log(s)
        archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_05_08/o1_mf_1_24_9pqgw8cq_.arc RECID=8 STAMP=847048488
        channel ORA_SBT_TAPE_1: piece handle=0fp7pqcf_1_1 tag=TAG20140508T185055
        channel ORA_SBT_TAPE_1: restored backup piece 1
        channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:00
        channel ORA_SBT_TAPE_1: starting archived log restore to default destination
        channel ORA_SBT_TAPE_1: restoring archived log
        archived log thread=1 sequence=26
        channel ORA_SBT_TAPE_1: reading from backup piece 0hp7pqtp_1_1
        archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_05_08/o1_mf_1_25_9pqgw9jj_.arc thread=1 sequence=25
        channel clone_default: deleting archived log(s)
        archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_05_08/o1_mf_1_25_9pqgw9jj_.arc RECID=9 STAMP=847048489
        channel ORA_SBT_TAPE_1: piece handle=0hp7pqtp_1_1 tag=TAG20140508T190009
        channel ORA_SBT_TAPE_1: restored backup piece 1
        channel ORA_SBT_TAPE_1: restore complete, elapsed time: 00:00:01
        archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_05_08/o1_mf_1_26_9pqgw9vf_.arc thread=1 sequence=26
        channel clone_default: deleting archived log(s)
        archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_05_08/o1_mf_1_26_9pqgw9vf_.arc RECID=10 STAMP=847048489
        media recovery complete, elapsed time: 00:00:01
        Finished recover at 2014-05-08 19:14:51
        
        sql statement: alter database open read only
        
        
        
        Oracle instance shut down
        
        
        Removing automatic instance
        Automatic instance removed
        auxiliary instance file /opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_sysaux_9pqgvs9r_.dbf deleted
        auxiliary instance file /opt/oracle/fast_recovery_area/CDB1/controlfile/o1_mf_9pqgvf5s_.ctl deleted
        Finished recover at 2014-05-08 19:14:53
        
        RMAN> 
        RMAN> alter pluggable database pdb1 open resetlogs;
        
        Statement processed
        
        
  2. Hello ,
    Thanks for your reply. As per your suggestion, I configured the device type and CHANNEL. Then ran the script. but this time I am getting new error.

    RUN {
    RESTORE PLUGGABLE DATABASE ‘PDBTEST’ UNTIL TIME “TO_DATE(’04-30-2014:20:34:58′, ‘MM-DD-YYYY:HH24:MI:SS’)”;
    RECOVER PLUGGABLE DATABASE ‘PDBTEST’ UNTIL TIME “TO_DATE(’04-30-2014:20:34:58′, ‘MM-DD-YYYY:HH24:MI:SS’)”;
    ALTER PLUGGABLE DATABASE PDBTEST OPEN RESETLOGS;
    }
    using target database control file instead of recovery catalog

    Starting restore at 09-MAY-14
    allocated channel: ORA_SBT_TAPE_1
    channel ORA_SBT_TAPE_1: SID=261 device type=SBT_TAPE
    channel ORA_SBT_TAPE_1: xxx
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=23 device type=DISK

    skipping datafile 16; already restored to file C:\APP\ORAUSER\ORADATA\ORCL\PDBTEST\SYSTEM01.DBF
    skipping datafile 17; already restored to file C:\APP\ORAUSER\ORADATA\ORCL\PDBTEST\SYSAUX01.DBF
    skipping datafile 18; already restored to file C:\APP\ORAUSER\ORADATA\ORCL\PDBTEST\PDBTEST_USERS01.DBF
    skipping datafile 19; already restored to file C:\APP\ORAUSER\ORADATA\ORCL\PDBTEST\FILE25.DAT
    skipping datafile 20; already restored to file C:\APP\ORAUSER\ORADATA\ORCL\PDBTEST\FILE17.DAT
    Finished restore at 09-MAY-14

    Starting recover at 09-MAY-14
    using channel ORA_SBT_TAPE_1
    using channel ORA_DISK_1
    RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time

    List of tablespaces expected to have UNDO segments
    Tablespace SYSTEM
    Tablespace UNDOTBS1

    Creating automatic instance, with SID=’brxk’

    initialization parameters used for automatic instance:
    db_name=ORCL
    db_unique_name=brxk_pitr_PDBTEST_ORCL
    compatible=12.1.0.0.0
    db_block_size=8192
    db_files=200
    sga_target=1G
    processes=80
    diagnostic_dest=C:\APP\ORAUSER
    #No auxiliary destination in use
    enable_pluggable_database=true
    _clone_one_pdb_recovery=true
    control_files=C:\APP\ORAUSER\FAST_RECOVERY_AREA\ORCL\CONTROLFILE\O1_MF_9PT05V49_.CTL
    #No auxiliary parameter file used

    starting up automatic instance ORCL
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 05/09/2014 21:53:00
    RMAN-04006: error from auxiliary database: ORA-01031: insufficient privileges

    I am not able to understand the reason for this. Thanks for your help in advance!

    Regards

    • Hi,
      ok please check these things:
      * Your user which you use for rman operations
      * Your passwordfile –> Try sqlplus sys/@yourdb as sysdba
      * Your remote_login_passwordfile parameter = EXCLUSIVE

      Rgds,
      Daniel

      • Hello Daniel,

        The credentials were fine. i will still check if there is any other issue and will post.
        Thanks for your help so much.

        Regards

      • Hi,
        ok to get more details, turn rman debug mode on. Then you should see what’s going on:

        RMAN> debug on
        
        RMAN-03036: Debugging set to level=9, types=ALL
        
        DBGSQL:     TARGET> begin dbms_rcvman.setDebugOn; dbms_rcvman.dumpPkgState('Debug On'); end;
        DBGSQL:        sqlcode = 0
        DBGRCVMAN: ENTERING dumpPkgState Debug On
        DBGRCVMAN: this_db_key=NULL
        DBGRCVMAN: this_dbinc_key=NULL
        DBGRCVMAN: this_reset_scn=NULL
        DBGRCVMAN: this_reset_time=NULL
        DBGRCVMAN: untilSCN=NULL
        DBGRCVMAN: untilTime=NULL
        DBGRCVMAN: getRA_completedAfter=NULL
        DBGRCVMAN: getRA_completedBefore=NULL                                                                                                                                                                                                                                                                                        
        DBGRCVMAN: getRA_likePattern=NULL   
        ...
        

        Rgds,
        Daniel

  3. Hello Daniel,
    I can see two channels allocated in your RMAN output.
    ORA_AUX_SBT_TAPE_1
    ORA_SBT_TAPE_1
    I can see the actual restore and recovery happening on channel ORA_SBT_TAPE_1 which is I believe established on the Target DB being restored.
    In my case, ORA_AUX_SBT_TAPE_1 this channel causes MML to load and fails in their library. I just wanted to know if target database channel ORA_SBT_TAPE_1 is doing actual restore (reading from the pieces from the SBT_LIBRARY)?

    Thanks n Regards,
    swaorclser

    • Hi,
      the cloning process is done in three steps.

      1. PDB Tablespaces Point in time recovery (ORA_SBT_TAPE_1), restore to original Files (ORA_DISK_1)
      2. Restore of all CDB Files (UNDO!) for consitent recovery (ORA_AUX_SBT_TAPE_1) restore to FRA (ORA_AUX_DISK_1)
      3. Reinstant PDB in CDB Database

      But your problem isn’t the channel allocation any more??
      During start of auxiliary database you are not able to connect.

      Rgds,
      Daniel

  4. Hi

    I am getting this error .. Can you please help me in this ?

    regards
    Anuj

    RMAN>
    backup pluggable database anujv plus archivelog;
    RMAN>

    Starting backup at 01-JUN-14
    current log archived
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting archived log backup set
    channel ORA_DISK_1: specifying archived log(s) in backup set
    input archived log thread=1 sequence=7 RECID=1 STAMP=849034927
    input archived log thread=1 sequence=8 RECID=2 STAMP=849034977
    input archived log thread=1 sequence=9 RECID=3 STAMP=849035050
    input archived log thread=1 sequence=10 RECID=4 STAMP=849039173
    input archived log thread=1 sequence=11 RECID=5 STAMP=849039174
    input archived log thread=1 sequence=12 RECID=6 STAMP=849039199
    input archived log thread=1 sequence=13 RECID=7 STAMP=849039260
    input archived log thread=1 sequence=14 RECID=8 STAMP=849041435
    input archived log thread=1 sequence=15 RECID=9 STAMP=849041508
    input archived log thread=1 sequence=16 RECID=10 STAMP=849041624
    input archived log thread=1 sequence=17 RECID=11 STAMP=849042082
    input archived log thread=1 sequence=18 RECID=12 STAMP=849042499
    input archived log thread=1 sequence=19 RECID=13 STAMP=849042781
    input archived log thread=1 sequence=20 RECID=14 STAMP=849043491
    input archived log thread=1 sequence=21 RECID=15 STAMP=849044880
    input archived log thread=1 sequence=22 RECID=16 STAMP=849045233
    input archived log thread=1 sequence=23 RECID=17 STAMP=849078429
    input archived log thread=1 sequence=24 RECID=18 STAMP=849078533
    input archived log thread=1 sequence=25 RECID=19 STAMP=849081210
    input archived log thread=1 sequence=26 RECID=20 STAMP=849082431
    channel ORA_DISK_1: starting piece 1 at 01-JUN-14
    channel ORA_DISK_1: finished piece 1 at 01-JUN-14
    piece handle=/u01/app/oracle/fast_recovery_area/VIHAAN/backupset/2014_06_01/o1_mf_annnn_TAG20140601T081351_9ronoo6k_.bkp tag=TAG20140601T081351 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:16
    Finished backup at 01-JUN-14

    Starting backup at 01-JUN-14
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting full datafile backup set
    channel ORA_DISK_1: specifying datafile(s) in backup set
    input datafile file number=00012 name=/u01/app/oracle/oradata/VIHAAN/FAB087B94FE072C2E0430C00A8C0644F/datafile/o1_mf_sysaux_9rmc9zv9_.dbf
    input datafile file number=00011 name=/u01/app/oracle/oradata/VIHAAN/FAB087B94FE072C2E0430C00A8C0644F/datafile/o1_mf_system_9rmc9yxg_.dbf
    input datafile file number=00015 name=/u01/app/oracle/oradata/VIHAAN/FAB087B94FE072C2E0430C00A8C0644F/datafile/anujv.dbf
    channel ORA_DISK_1: starting piece 1 at 01-JUN-14
    channel ORA_DISK_1: finished piece 1 at 01-JUN-14
    piece handle=/u01/app/oracle/fast_recovery_area/VIHAAN/FAB087B94FE072C2E0430C00A8C0644F/backupset/2014_06_01/o1_mf_nnndf_TAG20140601T081412_9ronp5br_.bkp tag=TAG20140601T081412 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15
    Finished backup at 01-JUN-14

    Starting backup at 01-JUN-14
    current log archived
    using channel ORA_DISK_1
    channel ORA_DISK_1: starting archived log backup set
    channel ORA_DISK_1: specifying archived log(s) in backup set
    input archived log thread=1 sequence=27 RECID=21 STAMP=849082528
    channel ORA_DISK_1: starting piece 1 at 01-JUN-14
    channel ORA_DISK_1: finished piece 1 at 01-JUN-14
    piece handle=/u01/app/oracle/fast_recovery_area/VIHAAN/backupset/2014_06_01/o1_mf_annnn_TAG20140601T081529_9ronrkf4_.bkp tag=TAG20140601T081529 comment=NONE
    channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
    Finished backup at 01-JUN-14

    Starting Control File and SPFILE Autobackup at 01-JUN-14
    piece handle=/u01/app/oracle/fast_recovery_area/VIHAAN/autobackup/2014_06_01/o1_mf_s_849082530_9ronrodn_.bkp comment=NONE
    Finished Control File and SPFILE Autobackup at 01-JUN-14

    RMAN> run {
    set until time “to_date(’21:48 31-05-2014′,’hh24:mi dd-mm-yyyy’)”;
    restore pluggable database pdb1;
    recover pluggable database pdb1;
    }
    2> 3> 4> 5>
    executing command: SET until clause

    Starting restore at 01-JUN-14
    using channel ORA_DISK_1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of restore command at 06/01/2014 08:17:31
    RMAN-06813: could not translate pluggable database PDB1

    RMAN> run {
    set until time “to_date(’21:48 31-05-2014′,’hh24:mi dd-mm-yyyy’)”;
    restore pluggable database anujv;
    recover pluggable database anujv;
    }2> 3> 4> 5>

    executing command: SET until clause

    Starting restore at 01-JUN-14
    using channel ORA_DISK_1

    skipping datafile 11; already restored to file /u01/app/oracle/oradata/VIHAAN/FAB087B94FE072C2E0430C00A8C0644F/datafile/o1_mf_system_9rmc9yxg_.dbf
    skipping datafile 12; already restored to file /u01/app/oracle/oradata/VIHAAN/FAB087B94FE072C2E0430C00A8C0644F/datafile/o1_mf_sysaux_9rmc9zv9_.dbf
    skipping datafile 15; already restored to file /u01/app/oracle/oradata/VIHAAN/FAB087B94FE072C2E0430C00A8C0644F/datafile/anujv.dbf
    restore not done; all files read only, offline, or already restored
    Finished restore at 01-JUN-14

    Starting recover at 01-JUN-14
    using channel ORA_DISK_1
    RMAN-05026: WARNING: presuming following set of tablespaces applies to specified Point-in-Time

    List of tablespaces expected to have UNDO segments
    Tablespace SYSTEM
    Tablespace UNDOTBS1

    Creating automatic instance, with SID=’EFah’

    initialization parameters used for automatic instance:
    db_name=VIHAAN
    db_unique_name=EFah_pitr_anujv_VIHAAN
    compatible=12.1.0.0.0
    db_block_size=8192
    db_files=200
    sga_target=1G
    processes=80
    diagnostic_dest=/u01/app/oracle
    #No auxiliary destination in use
    enable_pluggable_database=true
    _clone_one_pdb_recovery=true
    control_files=/u01/app/oracle/fast_recovery_area/VIHAAN/controlfile/o1_mf_9ronx841_.ctl
    #No auxiliary parameter file used

    starting up automatic instance VIHAAN

    Oracle instance started

    Total System Global Area 1068937216 bytes

    Fixed Size 2296576 bytes
    Variable Size 281019648 bytes
    Database Buffers 780140544 bytes
    Redo Buffers 5480448 bytes
    Automatic instance created

    contents of Memory Script:
    {
    # set requested point in time
    set until time “to_date(’21:48 31-05-2014′,’hh24:mi dd-mm-yyyy’)”;
    # restore the controlfile
    restore clone controlfile;
    # mount the controlfile
    sql clone ‘alter database mount clone database’;
    }
    executing Memory Script

    executing command: SET until clause

    Starting restore at 01-JUN-14
    allocated channel: ORA_AUX_DISK_1
    channel ORA_AUX_DISK_1: SID=20 device type=DISK

    Removing automatic instance
    shutting down automatic instance
    Oracle instance shut down
    Automatic instance removed
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of recover command at 06/01/2014 08:19:01
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-06026: some targets not found – aborting restore
    RMAN-06024: no backup or copy of the control file found to restore

    • Hi Anuj,
      i’vh tried to replay your problem but without success. I can only give you some advices.
      * Check your controlfile backups and the the corresponding time maybe you have delete an old controlfile backup?

      Try the follwing example, only with rman:
      1. Reset your rman config to defaut + controlfile autobackup on
      2. delete all backups and archivelogs
      3. do a full cdb backup (you need a backup of system,sysaux and undo tbs from root)
      4. wait some minutes
      5. backup only the pdb
      6. wait some minutes
      7. try to restore to the time between 3 and 5.
      8. try to restore to the time between 5 and now

      Here my example:

      RMAN> show all;
      
      RMAN configuration parameters for database with db_unique_name CDB1 are:
      CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
      CONFIGURE BACKUP OPTIMIZATION OFF; # default
      CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
      CONFIGURE CONTROLFILE AUTOBACKUP ON; # default
      CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
      CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
      CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
      CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
      CONFIGURE MAXSETSIZE TO UNLIMITED; # default
      CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
      CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
      CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
      CONFIGURE RMAN OUTPUT TO KEEP FOR 7 DAYS; # default
      CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
      CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/opt/oracle/product/12.1.0.1/dbhome_1/dbs/snapcf_CDB1.f'; # default
      
      RMAN> list backup;
      
      specification does not match any backup in the repository
      

      Do initial backup

      RMAN> backup database plus archivelog delete input;
      
      
      Starting backup at 12:55:55 09-06-2014
      current log archived
      allocated channel: ORA_DISK_1
      channel ORA_DISK_1: SID=185 device type=DISK
      channel ORA_DISK_1: starting archived log backup set
      channel ORA_DISK_1: specifying archived log(s) in backup set
      input archived log thread=1 sequence=41 RECID=23 STAMP=849789520
      input archived log thread=1 sequence=42 RECID=24 STAMP=849789524
      input archived log thread=1 sequence=43 RECID=25 STAMP=849789526
      input archived log thread=1 sequence=44 RECID=26 STAMP=849789526
      input archived log thread=1 sequence=45 RECID=27 STAMP=849789530
      input archived log thread=1 sequence=46 RECID=28 STAMP=849789530
      input archived log thread=1 sequence=47 RECID=29 STAMP=849790222
      input archived log thread=1 sequence=48 RECID=30 STAMP=849790555
      channel ORA_DISK_1: starting piece 1 at 12:55:55 09-06-2014
      channel ORA_DISK_1: finished piece 1 at 12:55:56 09-06-2014
      piece handle=/opt/oracle/fast_recovery_area/CDB1/backupset/2014_06_09/o1_mf_annnn_TAG20140609T125555_9sc4ovn4_.bkp tag=TAG20140609T125555 comment=NONE
      channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
      channel ORA_DISK_1: deleting archived log(s)
      archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_06_09/o1_mf_1_41_9sc3ojpq_.arc RECID=23 STAMP=849789520
      archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_06_09/o1_mf_1_42_9sc3onxn_.arc RECID=24 STAMP=849789524
      archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_06_09/o1_mf_1_43_9sc3op13_.arc RECID=25 STAMP=849789526
      archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_06_09/o1_mf_1_44_9sc3opvk_.arc RECID=26 STAMP=849789526
      archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_06_09/o1_mf_1_45_9sc3ot2x_.arc RECID=27 STAMP=849789530
      archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_06_09/o1_mf_1_46_9sc3otbk_.arc RECID=28 STAMP=849789530
      archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_06_09/o1_mf_1_47_9sc4cgbl_.arc RECID=29 STAMP=849790222
      archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_06_09/o1_mf_1_48_9sc4ovb9_.arc RECID=30 STAMP=849790555
      Finished backup at 12:55:56 09-06-2014
      
      Starting backup at 12:55:57 09-06-2014
      using channel ORA_DISK_1
      channel ORA_DISK_1: starting full datafile backup set
      channel ORA_DISK_1: specifying datafile(s) in backup set
      input datafile file number=00003 name=/opt/oracle/oradata/CDB1/datafile/o1_mf_sysaux_9ot1ojow_.dbf
      input datafile file number=00001 name=/opt/oracle/oradata/CDB1/datafile/o1_mf_system_9ot1pmrb_.dbf
      input datafile file number=00004 name=/opt/oracle/oradata/CDB1/datafile/o1_mf_undotbs1_9ot1qqx0_.dbf
      input datafile file number=00006 name=/opt/oracle/oradata/CDB1/datafile/o1_mf_users_9ot1qpv3_.dbf
      channel ORA_DISK_1: starting piece 1 at 12:55:57 09-06-2014
      channel ORA_DISK_1: finished piece 1 at 12:56:04 09-06-2014
      piece handle=/opt/oracle/fast_recovery_area/CDB1/backupset/2014_06_09/o1_mf_nnndf_TAG20140609T125557_9sc4ox9c_.bkp tag=TAG20140609T125557 comment=NONE
      channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
      channel ORA_DISK_1: starting full datafile backup set
      channel ORA_DISK_1: specifying datafile(s) in backup set
      input datafile file number=00009 name=/opt/oracle/oradata/CDB1/F8074FF2BCE01324E0430100007F9965/datafile/o1_mf_sysaux_9ot22fp8_.dbf
      input datafile file number=00008 name=/opt/oracle/oradata/CDB1/F8074FF2BCE01324E0430100007F9965/datafile/o1_mf_system_9ot22fph_.dbf
      input datafile file number=00010 name=/opt/oracle/oradata/CDB1/F8074FF2BCE01324E0430100007F9965/datafile/o1_mf_users_9ot22lwt_.dbf
      channel ORA_DISK_1: starting piece 1 at 12:56:04 09-06-2014
      channel ORA_DISK_1: finished piece 1 at 12:56:07 09-06-2014
      piece handle=/opt/oracle/fast_recovery_area/CDB1/F8074FF2BCE01324E0430100007F9965/backupset/2014_06_09/o1_mf_nnndf_TAG20140609T125557_9sc4p4gz_.bkp tag=TAG20140609T125557 comment=NONE
      channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
      channel ORA_DISK_1: starting full datafile backup set
      channel ORA_DISK_1: specifying datafile(s) in backup set
      input datafile file number=00007 name=/opt/oracle/oradata/CDB1/datafile/o1_mf_sysaux_9ot1rho4_.dbf
      input datafile file number=00005 name=/opt/oracle/oradata/CDB1/datafile/o1_mf_system_9ot1rhok_.dbf
      channel ORA_DISK_1: starting piece 1 at 12:56:07 09-06-2014
      channel ORA_DISK_1: finished piece 1 at 12:56:10 09-06-2014
      piece handle=/opt/oracle/fast_recovery_area/CDB1/F8073E990F480DABE0430100007F29F2/backupset/2014_06_09/o1_mf_nnndf_TAG20140609T125557_9sc4p7k2_.bkp tag=TAG20140609T125557 comment=NONE
      channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
      channel ORA_DISK_1: starting full datafile backup set
      channel ORA_DISK_1: specifying datafile(s) in backup set
      input datafile file number=00012 name=/opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_sysaux_9s00bt3h_.dbf
      input datafile file number=00011 name=/opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_system_9s00bt3h_.dbf
      channel ORA_DISK_1: starting piece 1 at 12:56:10 09-06-2014
      channel ORA_DISK_1: finished piece 1 at 12:56:13 09-06-2014
      piece handle=/opt/oracle/fast_recovery_area/CDB1/FB11189F65B10D36E0430100007F41AA/backupset/2014_06_09/o1_mf_nnndf_TAG20140609T125557_9sc4pbon_.bkp tag=TAG20140609T125557 comment=NONE
      channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
      Finished backup at 12:56:13 09-06-2014
      
      Starting backup at 12:56:13 09-06-2014
      current log archived
      using channel ORA_DISK_1
      channel ORA_DISK_1: starting archived log backup set
      channel ORA_DISK_1: specifying archived log(s) in backup set
      input archived log thread=1 sequence=49 RECID=31 STAMP=849790573
      channel ORA_DISK_1: starting piece 1 at 12:56:14 09-06-2014
      channel ORA_DISK_1: finished piece 1 at 12:56:15 09-06-2014
      piece handle=/opt/oracle/fast_recovery_area/CDB1/backupset/2014_06_09/o1_mf_annnn_TAG20140609T125614_9sc4pg31_.bkp tag=TAG20140609T125614 comment=NONE
      channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
      channel ORA_DISK_1: deleting archived log(s)
      archived log file name=/opt/oracle/fast_recovery_area/CDB1/archivelog/2014_06_09/o1_mf_1_49_9sc4pfvs_.arc RECID=31 STAMP=849790573
      Finished backup at 12:56:15 09-06-2014
      
      Starting Control File and SPFILE Autobackup at 12:56:15 09-06-2014
      piece handle=/opt/oracle/fast_recovery_area/CDB1/autobackup/2014_06_09/o1_mf_s_849790575_9sc4phk4_.bkp comment=NONE
      Finished Control File and SPFILE Autobackup at 12:56:16 09-06-2014
      
      RMAN> 
      

      Wait some time

      RMAN>  select to_char(sysdate,'hh24:mi:ss dd-mm-yyyy') from dual;
      
      TO_CHAR(SYSDATE,'HH
      -------------------
      12:58:55 09-06-2014
      
      RMAN> backup pluggable database ANUJV;
      
      Starting backup at 12:59:23 09-06-2014
      using channel ORA_DISK_1
      channel ORA_DISK_1: starting full datafile backup set
      channel ORA_DISK_1: specifying datafile(s) in backup set
      input datafile file number=00012 name=/opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_sysaux_9s00bt3h_.dbf
      input datafile file number=00011 name=/opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_system_9s00bt3h_.dbf
      channel ORA_DISK_1: starting piece 1 at 12:59:23 09-06-2014
      channel ORA_DISK_1: finished piece 1 at 12:59:26 09-06-2014
      piece handle=/opt/oracle/fast_recovery_area/CDB1/FB11189F65B10D36E0430100007F41AA/backupset/2014_06_09/o1_mf_nnndf_TAG20140609T125923_9sc4wch9_.bkp tag=TAG20140609T125923 comment=NONE
      channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
      Finished backup at 12:59:26 09-06-2014
      
      Starting Control File and SPFILE Autobackup at 12:59:26 09-06-2014
      piece handle=/opt/oracle/fast_recovery_area/CDB1/autobackup/2014_06_09/o1_mf_s_849790766_9sc4wgy1_.bkp comment=NONE
      Finished Control File and SPFILE Autobackup at 12:59:27 09-06-2014
      
      RMAN> 
      

      Wait some time

      ... 
      RMAN> sql 'alter system archive log current';
      
      sql statement: alter system archive log current
      
      RMAN> sql 'alter system archive log current';
      
      sql statement: alter system archive log current
      
      RMAN> select to_char(sysdate,'hh24:mi:ss dd-mm-yyyy') from dual;
      
      TO_CHAR(SYSDATE,'HH
      -------------------
      13:02:03 09-06-2014
      

      Check backups

      RMAN> list backup of pluggable database ANUJV;
      
      
      List of Backup Sets
      ===================
      
      
      BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
      ------- ---- -- ---------- ----------- ------------ -------------------
      46      Full    740.20M    DISK        00:00:02     12:56:12 09-06-2014
              BP Key: 46   Status: AVAILABLE  Compressed: NO  Tag: TAG20140609T125557
              Piece Name: /opt/oracle/fast_recovery_area/CDB1/FB11189F65B10D36E0430100007F41AA/backupset/2014_06_09/o1_mf_nnndf_TAG20140609T125557_9sc4pbon_.bkp
        List of Datafiles in backup set 46
        Container ID: 4, PDB Name: ANUJV
        File LV Type Ckp SCN    Ckp Time            Name
        ---- -- ---- ---------- ------------------- ----
        11      Full 2185195    12:38:03 09-06-2014 /opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_system_9s00bt3h_.dbf
        12      Full 2185195    12:38:03 09-06-2014 /opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_sysaux_9s00bt3h_.dbf
      
      BS Key  Type LV Size       Device Type Elapsed Time Completion Time    
      ------- ---- -- ---------- ----------- ------------ -------------------
      49      Full    740.20M    DISK        00:00:02     12:59:25 09-06-2014
              BP Key: 49   Status: AVAILABLE  Compressed: NO  Tag: TAG20140609T125923
              Piece Name: /opt/oracle/fast_recovery_area/CDB1/FB11189F65B10D36E0430100007F41AA/backupset/2014_06_09/o1_mf_nnndf_TAG20140609T125923_9sc4wch9_.bkp
        List of Datafiles in backup set 49
        Container ID: 4, PDB Name: ANUJV
        File LV Type Ckp SCN    Ckp Time            Name
        ---- -- ---- ---------- ------------------- ----
        11      Full 2185195    12:38:03 09-06-2014 /opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_system_9s00bt3h_.dbf
        12      Full 2185195    12:38:03 09-06-2014 /opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_sysaux_9s00bt3h_.dbf
      
      RMAN> 
      

      Try frist restore

      run {
      set until time "to_date('12:58:00 09-06-2014','hh24:mi:ss dd-mm-yyyy')";
      restore pluggable database anujv;
      recover pluggable database anujv;
      5> }
      
      executing command: SET until clause
      
      Starting restore at 13:04:47 09-06-2014
      using channel ORA_DISK_1
      
      skipping datafile 11; already restored to file /opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_system_9s00bt3h_.dbf
      skipping datafile 12; already restored to file /opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_sysaux_9s00bt3h_.dbf
      restore not done; all files read only, offline, or already restored
      Finished restore at 13:04:47 09-06-2014
      
      ....
      Automatic instance created
      
      contents of Memory Script:
      {
      # set requested point in time
      set until  time "to_date('12:58:00 09-06-2014','hh24:mi:ss dd-mm-yyyy')";
      # restore the controlfile
      restore clone controlfile;
      # mount the controlfile
      sql clone 'alter database mount clone database';
      }
      executing Memory Script
      
      executing command: SET until clause
      
      Starting restore at 13:05:00 09-06-2014
      allocated channel: ORA_AUX_DISK_1
      channel ORA_AUX_DISK_1: SID=128 device type=DISK
      
      channel ORA_AUX_DISK_1: starting datafile backup set restore
      channel ORA_AUX_DISK_1: restoring control file
      channel ORA_AUX_DISK_1: reading from backup piece /opt/oracle/fast_recovery_area/CDB1/autobackup/2014_06_09/o1_mf_s_849790575_9sc4phk4_.bkp
      channel ORA_AUX_DISK_1: piece handle=/opt/oracle/fast_recovery_area/CDB1/autobackup/2014_06_09/o1_mf_s_849790575_9sc4phk4_.bkp tag=TAG20140609T125615
      channel ORA_AUX_DISK_1: restored backup piece 1
      channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
      output file name=/opt/oracle/fast_recovery_area/CDB1/controlfile/o1_mf_9sc56hfb_.ctl
      Finished restore at 13:05:01 09-06-2014
      
      sql statement: alter database mount clone database
      
      contents of Memory Script:
      {
      # set requested point in time
      set until  time "to_date('12:58:00 09-06-2014','hh24:mi:ss dd-mm-yyyy')";
      # switch to valid datafilecopies
      switch clone datafile  11 to datafilecopy 
       "/opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_system_9s00bt3h_.dbf";
      switch clone datafile  12 to datafilecopy 
       "/opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_sysaux_9s00bt3h_.dbf";
      # set destinations for recovery set and auxiliary set datafiles
      set newname for datafile  1 to 
       "/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_system_9sc56w1l_.dbf";
      set newname for datafile  4 to 
       "/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_undotbs1_9sc56w33_.dbf";
      set newname for datafile  3 to 
       "/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_sysaux_9sc56w49_.dbf";
      set newname for datafile  6 to 
       "/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_users_9sc571w9_.dbf";
      # restore the tablespaces in the recovery set and the auxiliary set
      restore clone datafile  1, 4, 3, 6;
      switch clone datafile all;
      }
      ....
      sql statement: alter database open read only
      
      
      
      Oracle instance shut down
      
      
      Removing automatic instance
      Automatic instance removed
      auxiliary instance file /opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_sysaux_9sc56w49_.dbf deleted
      auxiliary instance file /opt/oracle/fast_recovery_area/CDB1/controlfile/o1_mf_9sc56hfb_.ctl deleted
      Finished recover at 13:05:16 09-06-2014
      
      RMAN> 
      

      Try second restore

      run {
      set until time "to_date('13:01:00 09-06-2014','hh24:mi:ss dd-mm-yyyy')";
      restore pluggable database anujv;
      recover pluggable database anujv;
      5> }
      
      executing command: SET until clause
      
      Starting restore at 13:05:50 09-06-2014
      using channel ORA_DISK_1
      
      channel ORA_DISK_1: starting datafile backup set restore
      channel ORA_DISK_1: specifying datafile(s) to restore from backup set
      channel ORA_DISK_1: restoring datafile 00011 to /opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_system_9s00bt3h_.dbf
      channel ORA_DISK_1: restoring datafile 00012 to /opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_sysaux_9s00bt3h_.dbf
      channel ORA_DISK_1: reading from backup piece /opt/oracle/fast_recovery_area/CDB1/FB11189F65B10D36E0430100007F41AA/backupset/2014_06_09/o1_mf_nnndf_TAG20140609T125923_9sc4wch9_.bkp
      channel ORA_DISK_1: piece handle=/opt/oracle/fast_recovery_area/CDB1/FB11189F65B10D36E0430100007F41AA/backupset/2014_06_09/o1_mf_nnndf_TAG20140609T125923_9sc4wch9_.bkp tag=TAG20140609T125923
      channel ORA_DISK_1: restored backup piece 1
      channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
      Finished restore at 13:05:53 09-06-2014
      
      ....
      
      Automatic instance created
      
      contents of Memory Script:
      {
      # set requested point in time
      set until  time "to_date('13:01:00 09-06-2014','hh24:mi:ss dd-mm-yyyy')";
      # restore the controlfile
      restore clone controlfile;
      # mount the controlfile
      sql clone 'alter database mount clone database';
      }
      executing Memory Script
      
      executing command: SET until clause
      
      Starting restore at 13:06:06 09-06-2014
      allocated channel: ORA_AUX_DISK_1
      channel ORA_AUX_DISK_1: SID=128 device type=DISK
      
      channel ORA_AUX_DISK_1: starting datafile backup set restore
      channel ORA_AUX_DISK_1: restoring control file
      channel ORA_AUX_DISK_1: reading from backup piece /opt/oracle/fast_recovery_area/CDB1/autobackup/2014_06_09/o1_mf_s_849790766_9sc4wgy1_.bkp
      channel ORA_AUX_DISK_1: piece handle=/opt/oracle/fast_recovery_area/CDB1/autobackup/2014_06_09/o1_mf_s_849790766_9sc4wgy1_.bkp tag=TAG20140609T125926
      channel ORA_AUX_DISK_1: restored backup piece 1
      channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:00:01
      output file name=/opt/oracle/fast_recovery_area/CDB1/controlfile/o1_mf_9sc58l0x_.ctl
      Finished restore at 13:06:07 09-06-2014
      
      sql statement: alter database mount clone database
      
      contents of Memory Script:
      {
      # set requested point in time
      set until  time "to_date('13:01:00 09-06-2014','hh24:mi:ss dd-mm-yyyy')";
      # switch to valid datafilecopies
      switch clone datafile  11 to datafilecopy 
       "/opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_system_9s00bt3h_.dbf";
      switch clone datafile  12 to datafilecopy 
       "/opt/oracle/oradata/CDB1/FB11189F65B10D36E0430100007F41AA/datafile/o1_mf_sysaux_9s00bt3h_.dbf";
      # set destinations for recovery set and auxiliary set datafiles
      set newname for datafile  1 to 
       "/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_system_9sc58y3k_.dbf";
      set newname for datafile  4 to 
       "/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_undotbs1_9sc58y4o_.dbf";
      set newname for datafile  3 to 
       "/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_sysaux_9sc58y6j_.dbf";
      set newname for datafile  6 to 
       "/opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_users_9sc5940d_.dbf";
      # restore the tablespaces in the recovery set and the auxiliary set
      restore clone datafile  1, 4, 3, 6;
      switch clone datafile all;
      }
      ....
      sql statement: alter database open read only
      
      
      
      Oracle instance shut down
      
      
      Removing automatic instance
      Automatic instance removed
      auxiliary instance file /opt/oracle/fast_recovery_area/CDB1/datafile/o1_mf_sysaux_9sc58y6j_.dbf deleted
      auxiliary instance file /opt/oracle/fast_recovery_area/CDB1/controlfile/o1_mf_9sc58l0x_.ctl deleted
      Finished recover at 13:06:23 09-06-2014
      
      RMAN> 
      

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s