Database Reference
In-Depth Information
You can also recover a range of blocks and several data files at one time:
Recover datafile 6 block 55 to 105 datafile 7 block 27 to 44;
You can also run the BACKUP DATABASE VALIDATE command to determine if any blocks
are media corrupt. Any blocks that are corrupt will be listed in the V$DATABASE_BLOCK_
CORRUPTION view. The column CORRUPTION_TYPE will indicate if they are media corrupt.
You can attempt to recover all corrupted blocks listed in the V$DATABASE_BLOCK_
CORRUPTION view by using the RECOVER command with the CORRUPTION LIST parameter
from RMAN, as shown in this example:
RMAN> recover corruption list;
Starting recover at 28-OCT-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=153 device type=DISK
starting media recovery
media recovery complete, elapsed time: 00:00:01
Finished recover at 28-OCT-13
Recovering the Control File
One recovery that you need to be prepared for is the recovery of a lost control file.
Two different situations come into play here. The first is recovering the control file from
a control-file autobackup; the second is recovering a control file if you are not using
control-file autobackups. Let's look at each of these methods in more detail.
Recovering Control Files with Control-File Autobackups
We talked about RMAN control-file autobackups in Chapter 3. They are a way of automat-
ing the backup of database control files. Recovering the control file is quite easy if you are
using control-file autobackups. There are two different situations that you will deal with
when using control-file autobackups: one when you are using the Fast Recovery Area (FRA)
and the other when you are not using the FRA. Let's look at these in a bit more detail.
Control-File Backups Using the FRA
If you are using the FRA and have enabled control-file autobackups, then restoring the cur-
rent control file is easy. Simply do the following:
1. Start the database instance with the STARTUP NOMOUNT command.
2. Issue the RESTORE CONTROLFILE FROM AUTOBACKUP command. RMAN will proceed to
restore the control file from the latest automated control-file backup on disk.
3. Mount the database after the restore is complete.
4. Recover the database with the RMAN RECOVER command.
5. Open it using the ALTER DATABASE OPEN RESETLOGS command.
Search WWH ::




Custom Search