Database Reference
In-Depth Information
You can check the status of your pluggable databases via this query:
SQL> select name, open_mode from v$pdbs;
Restoring and Recovering a Pluggable Database
You have two options for restoring and recovering a pluggable database:
Connect as the container root user, and specify the pluggable database to be restored and
recovered.
Connect directly to the pluggable database as a privileged pluggable-level user, and issue
RESTORE and RECOVER commands.
This first example connects to the root container and restores and recovers the data files associated with the
salespdb pluggable database. For this to work, the pluggable database must not be open (because the pluggable
database's system data files are also being restored and recovered):
$ rman target /
RMAN> alter pluggable database salespdb close;
RMAN> restore pluggable database salespdb;
RMAN> recover pluggable database salespdb;
RMAN> alter pluggable database salespdb open;
You can also connect directly to a pluggable database and perform restore and recovery operations. When
connected directly to the pluggable database, the user only has access to the data files associated with the pluggable
database:
$ rman target sys/foo@salespdb
RMAN> shutdown immediate;
RMAN> restore database;
RMAN> recover database;
RMAN> alter database open;
When you're connected directly to a pluggable database, you can't specify the name of the pluggable database
as part of the RESTORE and RECOVER commands. In this situation, you'll get an RMAN-07536: command not allowed
when connected to a Pluggable Database error.
Note
The prior code only affects data files associated with the pluggable database to which you are connected.
The pluggable database needs to be closed for this to work. However, the root container database can be open or
mounted. Also, you must use a backup that was taken while connected to the pluggable database as a privileged user.
The privileged pluggable database user can't access backups of data files initiated by the root container database
privileged user.
 
 
Search WWH ::




Custom Search