Database Reference
In-Depth Information
restore database;
Recover database;
Alter database open;
Looks just the same, doesn't it? You can also restore a specific PDB from RMAN
using the RESTORE PLUGGABLE DATABASE command, as shown in this example of restor-
ing the mypdb PDB:
C:>set ORACLE_SID=mycdb
rman target=/
Rman>Alter pluggable database mypdb close;
Rman>restore pluggable database mypdb;
Rman>Recover pluggable database mypdb;
Rman>Alter pluggable database mypdb open;
Note that you have to close the PDB and then perform the restore using the RESTORE
PLUGGABLE DATABASE RMAN command. Then you recover the pluggable database followed
by opening the PDB.
You can also perform a point-in-time restore and recovery of an individual PDB using
the RESTORE PLUGGABLE DATABASE command, as shown here:
C:>set ORACLE_SID=mycdb
rman target=/
Rman>Alter pluggable database mypdb close;
Rman>restore pluggable database mypdb until time 'sysdate-1/24';
Rman>Recover pluggable database mypdb until time 'sysdate-1/24';
Rman>Alter pluggable database mypdb open;
Additionally, you can restore specific tablespaces and data files associated with a specific
PDB by logging into the PDB and using the RESTORE TABLESPACE , RECOVER TABLESPACE ,
RESTORE DATAFILE , and RECOVER DATAFILE commands. Here is an example of restoring a
tablespace called USERS . You first take the tablespace offline and then restore it. You then
recover the tablespace to apply the online redo logs and finally bring it online. Note that the
PDB must be open before you can do this.
rman target sys/robert@mypdb
Rman>Alter tablespace users offline;
Rman>restore tablespace users;
Rman>Recover tablespace users;
Rman>Alter tablespace users online;
Duplicating a PDB with RMAN
The RMAN DUPLICATE command, which we have already discussed, works the
same way with a container database. The only thing you need to do is add the
Search WWH ::




Custom Search