Database Reference
In-Depth Information
Restoring a Container Database and Its Associated Pluggable Databases
Starting with Oracle 12c, you can create pluggable databases within one container database. When dealing with
container and associated pluggable databases, there are three basic scenarios:
All data files have experienced media failure (container root data files as well as all associated
pluggable database data files).
Just the data files associated with the container root database have experienced media failure.
Only data files associated with a pluggable database have experienced media failure.
The prior scenarios are covered in the following sections.
Restoring and Recovering All Data Files
To restore and recover all data files associated with a container database (this includes the root container, the seed
container, and all associated pluggable databases), use RMAN to connect to the container database as a user with
sysdba or sysbackup privileges. Because the data files associated with the root system tablespace are being restored,
the database must be started in mount mode (and not open):
$ rman target /
RMAN> startup mount;
RMAN> restore database;
RMAN> recover database;
RMAN> alter database open;
Keep in mind that when you open a container database, this does not, by default, open the associated pluggable
databases. You can do that from the root container, as follows:
RMAN> alter pluggable database all open;
Restoring and Recovering Root Container Data Files
If just data files associated with the root container have been damaged, then you can restore and recover at the root
level. In this example the root container's system data file is being restored, so the database must not be open. The
following commands instruct RMAN to restore only the data files associated with the root container database, via the
keyword root :
$ rman target /
RMAN> startup mount;
RMAN> restore database root;
RMAN> recover database root;
RMAN> alter database open;
In the prior code the restore database root command instructs RMAN to restore only data files associated
with the root container database. After the container database is opened, you must open any associated pluggable
databases. You can do so from the root container, as shown:
RMAN> alter pluggable database all open;
 
Search WWH ::




Custom Search