Database Reference
In-Depth Information
6. Now restore the database backup data files from your hot backup media.
7. Restore all archived redo logs that will be needed for recovery. You will need to restore
all archived redo logs generated from the beginning of the backup image you restored
in step 2.
Figuring Out Which Archived Redo logs You Need
If you need to figure out exactly which archived redo logs you need to restore your backup
(so, perhaps, you can restore those files off of backup media), you can use the V$RECOVER_
FILE and the V$LOG_HISTORY views. The V$RECOVER_FILE view provides the last change
number (in the CHANGE# column) present in the file(s) needing recovery. The V$LOG_HISTORY
view will tell you which archived redo logs the changes are in. Here is an example:
ORA-01157: cannot identify/lock data file 4- see DBWR trace file
ORA-01110: data file 4: 'C:\ORACLE\ORADATA\ORCL\USERS01.DBF'
SQL> host copy users01.dbf.backup users01.dbf
1 file(s) copied.
SQL> Select a.file#, a.change#, b.first_change#, b.next_change#, b.sequence#
2 From v$recover_file a, v$log_history b
3 Where a.change#<=b.next_change#;
FILE# CHANGE# FIRST_CHANGE# NEXT_CHANGE# SEQUENCE#
---------- ---------- ------------- ------------ ----------
4 1418889 1417349 1438925 20
You could also find the name of the actual archived redo logs needed for recovery by query-
ing the V$ARCHIVED_LOG view. In some cases, the log sequence number will not show up
here if the associated online redo log file has not yet been archived.
SQL> Select a.file#, a.change#, b.first_change#, b.next_change#,
2 b.sequence#, b.name
3 From v$recover_file a, v$archived_log b
4 Where a.change#<=b.next_change#;
FILE# CHANGE# FIRST_CHANGE# NEXT_CHANGE# SEQUENCE#
---------- ---------- ------------- ------------ ----------
NAME
--------------------------------------------------
4 1418889 1417349 1438925 20
C:\ORACLE\ARCH\ORCL\ARC00020_0662757171.001
Search WWH ::




Custom Search