Database Reference
In-Depth Information
by querying the
FIRST_TIME
column of the
V$LOG_HISTORY
view for each redo log. In this
example, RMAN will restore the database to 9/29/2013 at 15:00:00:
restore database until time '09/29/2013:15:00:00';
recover database until time '09/29/2013:15:00:00';
alter database open resetlogs;
SCN
The
SCN-based point-in-time recovery
method is based on recovery to a spe-
cific SCN in the database. You can determine the current SCN of the database from the
CURRENT_SCN
column of the
V$DATABASE
view. You can determine the SCN range contained
within a given redo log by querying the
FIRST_CHANGE#
and
NEXT_CHANGE#
columns of the
V$LOG_HISTORY
view. Here is an example of an SCN-based point-in-time recovery:
restore database until SCN 12345;
recover database until SCN 12345;
alter database open resetlogs;
Log Sequence Number
The
log sequence number point-in-time recovery
method is based
on recovery up to and including a specific log sequence number. Log sequence numbers for
individual redo logs can be found in the
V$LOG_HISTORY
and
V$LOG
views. Here is an example
of a point-in-time recovery based on a log sequence number:
restore database until sequence 12345;
recover database until sequence 12345;
alter database open resetlogs;
In Exercise 5.2, you'll perform a point-in-time recovery with RMAN.
exeRCiSe 5.2
Perform a Point-in-Time Recovery with RMAN
This activity builds on the backup done in Exercise 4.2 in Chapter 4, “Using the RMAN
Recovery Catalog.” You should have completed Exercise 4.2 prior to executing this activ-
ity. Please note that the output you experience from this exercise will probably differ from
the output shown in this exercise.
1.
Complete Exercise 4.2.
2.
Set the
NLS_DATE_FORMAT
environment variable from the operating system.
In Unix (may vary based on the shell you are using):
export NLS_DATE_FORMAT='mm/dd/yyyy hh24:mi:ss'
In DOS:
set NLS_DATE_FORMAT=mm/dd/yyyy hh24:mi:ss
Search WWH ::
Custom Search