Databases Reference
In-Depth Information
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 (since the pluggable
database's system data file[s] is 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 has access only 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 cannot 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 affects only 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 parent container database can be open
or mounted. Also, you must have initiated a backup from the pluggable database privileged user. The privileged
pluggable database user cannot access backups of data files initiated by the root container database privileged user.
How It Works
Restore and recovery of a container database is very similar to restore and recovery for a non-container database. If you
have sysdba or sysbackup access to the root container database, you can perform any type of restore and recovery:
Restore and recover all data files associated with the database
Just files associated with the root container
Initiate restore and recovery operations for any associated pluggable databases
if you need to restore control files and/or archive redo logs, you must do so when connected to the root
container database as a sysdba or sysbackup privileged user.
Note
When connected directly to a pluggable database, you can restore and recover only data files associated with the
pluggable database. The pluggable database must be shut down while restoring and recovering data file(s) associated
with the pluggable database's system tablespace. The parent container database needs to be either open or mounted
 
 
Search WWH ::




Custom Search