Oracle9i Recovery Manager Reference Release 1 (9.0.1) Part Number A90136-02 |
|
RMAN Commands , 46 of 60
To reset the target database in the RMAN repository, which means to do either of the following actions:
ALTER
DATABASE
OPEN
RESETLOGS
has been executed and that a new incarnation of the target database has been created. Note that if you run the RMAN command
ALTER DATABASE
OPEN
RESETLOGS
(not the SQL statement with the same keywords), then RMAN resets the target database automatically so that you do not have to run RESET
DATABASE
. By resetting the database, RMAN considers the new incarnation as the current incarnation of the database.
RESETLOGS
operation, or when attempting to undo the affects of a RESETLOGS
by restoring backups taken before a RESETLOGS
.
RESET
DATABASE
only at the RMAN prompt.
RESET
DATABASE
command before you can use RMAN with a target database that has been opened with the SQL statement ALTER
DATABASE
OPEN
RESETLOGS
option. If you do not, then RMAN refuses to access the recovery catalog because it cannot distinguish between a RESETLOGS
operation and an accidental restore of an old control file. The RESET
DATABASE
command gives confirmation to RMAN that you issued a RESETLOGS
command.
TO
INCARNATION
unless the database is started but not mounted. If you mount a control file from an incarnation after the desired incarnation, then RESET
DATABASE
TO
INCARNATION
fails because of a control file mismatch. If you mount the control file from the desired incarnation and then run RESET
DATABASE
TO
INCARNATION
, then the connection to the target database and recovery catalog fails due to an incarnation mismatch.
The following scenario makes an old incarnation of database prod1
current again:
# step 1: obtain the primary key of old incarnation LIST INCARNATION OF DATABASE PROD1; List of Database Incarnations DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time ------- ------- ------- ------ --- ---------- ---------- 1 2 PROD1 1224038686 NO 1 02-JUL-00 1 582 PROD1 1224038686 YES 59727 10-JUL-00 # step 2: start instance and reset database SHUTDOWN IMMEDIATE; STARTUP NOMOUNT; RESET DATABASE TO INCARNATION 2; # step 3: restore control file from previous incarnation: RESTORE CONTROLFILE; # step 4: shut down and then and mount the database SHUTDOWN IMMEDIATE STARTUP MOUNT # step 5: restore and recover the database to a point before the RESETLOGS RESTORE DATABASE UNTIL SEQUENCE 1001; RECOVER DATABASE UNTIL SEQUENCE 1001; # step 6: make this incarnation the current incarnation: ALTER DATABASE OPEN RESETLOGS;
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|