Databases Reference
In-Depth Information
Step 12: Recover the Database
Next, you need to apply any archive redo files that were generated during the backup. These should be included in
the backup because the archivelog all clause was used to take the backup. Initiate the application of redo via the
recover database command:
RMAN> recover database;
RMAN will restore and apply as many archive redo logs as it has in the backup pieces and then may throw an
error when it reaches an archive redo log that doesn't exist. For example:
RMAN-06054: media recovery requesting unknown archived log for...
That error message is fine. The recovery process will restore and recover archive redo logs contained in the
backups, which should be sufficient to open the database. The recovery process doesn't know where to stop applying
archive redo logs and therefore will continue to attempt to apply until it can't find the next log. Having said that, now
is a good time to verify that your data files are online and not in a fuzzy state:
select
file#
,status
,fuzzy
,error
,checkpoint_change#,
to_char(checkpoint_time,'dd-mon-rrrr hh24:mi:ss') as checkpoint_time
from v$datafile_header;
Step 13: Set the New Location for the Online Redo Logs
If your source and destination servers have the exact same directory structures, you don't need to set a new location
for the online redo logs (so you can skip this step).
However, if the directory structures are different, you'll need to update the control file to reflect the new directory
for the online redo logs. We sometimes use a SQL script that generates SQL to assist with this step:
set head off feed off verify off echo off pages 0 trimspool on
set lines 132 pagesize 0
spo renlog.sql
select
'alter database rename file ' || chr(10)
|| '''' || member || '''' || ' to ' || chr(10) || '''' || member || '''' ||';'
from v$logfile;
spo off;
For this example, here is a snippet of the renlog.sql file that was generated:
alter database rename file
'/u01/oraredo/o12c/redo01a.rdo' to
'/u01/oraredo/o12c/redo01a.rdo';
...
 
Search WWH ::




Custom Search