Database Reference
In-Depth Information
If everything goes as expected, the last message you should see is this:
Statement processed
Using the Backup Control File
This technique uses an autobackup of the control file retrieved from the FRA (see the section “Restoring a Control
File,” later in this chapter, for more examples of how to restore your control file). In this scenario the control file is first
retrieved from a backup before restoring and recovering the database:
$ rman target /
RMAN> startup nomount;
RMAN> restore controlfile from autobackup;
RMAN> alter database mount;
RMAN> restore database;
RMAN> recover database;
RMAN> alter database open resetlogs;
If successful, the last message you should see is this:
Statement processed
Restoring and Recovering Tablespaces
Sometimes you'll have a media failure that's localized to a particular tablespace or set of tablespaces. In this situation,
it's appropriate to restore and recover at the tablespace level of granularity. The RMAN RESTORE TABLESPACE and
RECOVER TABLESPACE commands will restore and recover all data files associated with the specified tablespace(s).
Restoring Tablespaces While the Database Is Open
If your database is open, then you must take offline the tablespace you want to restore and recover. You can do this for any
tablespace except SYSTEM and UNDO . This example restores and recovers the USERS tablespace while the database is open:
$ rman target /
RMAN> sql 'alter tablespace users offline immediate';
RMAN> restore tablespace users;
RMAN> recover tablespace users;
RMAN> sql 'alter tablespace users online';
After the tablespace is brought online, you should see a message such as this:
sql statement: alter tablespace users online
Starting with Oracle 12c, you can run SQL statements directly, without the RMAN sql command and associated
quotation marks; for example,
$ rman target /
RMAN> alter tablespace users offline immediate;
RMAN> restore tablespace users;
RMAN> recover tablespace users;
RMAN> alter tablespace users online;
 
Search WWH ::




Custom Search