Database Reference
In-Depth Information
Restoring a Container Database
The restore operation of a Container Database is not very different from restoring a non-CDB. In any case, any
Pluggable Database in the CDB is affected, especially if incomplete recovery has to be performed. As with every
database-wide restore operation you need to bring the database into mount mode before you can initiate the restore,
followed by the recover command. The following little command restores and recovers the CDB named “CDB1”.
Let rMaN DO the SYNtaX CheCKING FOr YOU!
If you are unsure if the syntax of your script is correct, you can use the checksyntax option in rMan before trying
the script in anger. Consider the following example of a script used for a full database restore and complete
recovery:
[oracle@server1 (CDB1) ~]$ cat recover.rman
shutdown immediate;
startup mount;
restore database;
recover database;
alter database open;
you can check this script for correctness without having to execute it first and run into problems while a part is in
progress:
[oracle@server1 ~]$ rman target / checksyntax @recover.rman
Recovery Manager: Release 12.1.0.1.0 - Production on Sun Sep 22 21:10:59 2013
Copyright (c) 1982, 2013, Oracle and/or its affiliates. All rights reserved.
connected to target database: CDB1 (DBID=800340993)
RMAN> shutdown immediate;
2> startup mount;
3> restore database;
4> recover database;
5> alter database open;
6>
7>
The cmdfile has no syntax errors
Recovery Manager complete.
the example is of course oversimplified, but it gives you the idea. More complex scripts with multiple run {}
blocks can easily fail at runtime, checking for syntax errors is a good idea.
 
Search WWH ::




Custom Search