Restore and recover Pluggable Database (PDB) from rman backup

Before restoration and recovery of PDB (Pluggable database), we need to ensure that valid rman backup available. We have already discussed the same in another post. Please check here for more information regarding RMAN Backup.


Start the database with nomount.


$sqlplus / as sysdba


SQL>startup nomount pfile='/home/oracle/ora12c/dbs/orcl.pfile';


RMAN> restore controlfile from '/backup01/rmanbkp/*****';



SQL>alter database mount;




Now we will restore the database.



$RMAN target sysbackup/*****@PDBORCL1

Connected to target database: ORA12CP (DBID=1429060559, not open)


RMAN> run {

 allocate channel 'dev_0' type 'sbt_tape'
 parms 'SBT_LIBRARY=/opt/omni/lib/libob2oracle8_64bit.so,ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=ORA12cP,OB2BARLIST=1498520660,OB2BARHOSTNAME=TESTdb.com)';

 restore pluggable database PDBORCL1;

 recover pluggable database PDBORCL2;
  }


Note:- If datafile destination different as compare to source database. Use SET NEWNAME FOR DATAFILE  and then use SWITCH DATAFILE ALL. Pls check here for more information.


Before execute resetlogs , need to update redologfiles and tempfiles. For more info check here.


SQL> alter database open resetlogs;



Run below to check the status of Pluggable Database(PDB).


SQL> select name,open_mode from v$pdbs;



To open all pluggabel database.

SQL>alter pluggable database all open;


No comments:

Post a Comment

Thanks for reading till end. I hope this will help you more to improve your knowledge.

Now it's your turn!

What do you think? Share your experience in the comments box and subscribe for more interesting post.