| Oracle9i Recovery Manager Reference Release 2 (9.2) Part Number A96565-01 |
|
RMAN Commands , 45 of 59

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 informs RMAN that you issued a RESETLOGS command.TO INCARNATION unless the database is started NOMOUNT. 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.| Syntax Element | Description |
|---|---|
|
|
Changes the current incarnation to an older incarnation. Specify the primary key of the |
The following scenario makes an old incarnation of database trgt current again:
# step 1: obtain the primary key of old incarnation LIST INCARNATION OF DATABASE trgt; List of Database Incarnations DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time ------- ------- -------- ---------------- --- ---------- ---------- 1 2 TRGT 1334358386 NO 154381 OCT 30 2001 16:02:12 1 116 TRGT 1334358386 YES 154877 OCT 30 2001 16:37:39 # step 2: start instance and reset database to incarnation key 2 STARTUP FORCE NOMOUNT; RESET DATABASE TO INCARNATION 2; # step 3: restore control file from previous incarnation, then shut down instance # and mount control file RESTORE CONTROLFILE; STARTUP FORCE MOUNT; # step 4: restore and recover the database to a point before the RESETLOGS RESTORE DATABASE UNTIL SCN 154876; RECOVER DATABASE UNTIL SCN 154876; # step 5: make this incarnation the current incarnation and then list incarnations: ALTER DATABASE OPEN RESETLOGS; LIST INCARNATION OF DATABASE trgt; List of Database Incarnations DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time ------- ------- -------- ---------------- --- ---------- ---------- 1 2 TRGT 1334358386 NO 154381 OCT 30 2001 16:02:12 1 116 TRGT 1334358386 NO 154877 OCT 30 2001 16:37:39 1 311 TRGT 1334358386 YES 154877 OCT 30 2001 17:17:03
This example assumes that an incomplete recovery or recovery with a backup control file was performed inNOCATALOGmode. Later, RMAN is started inCATALOGmode, but theRESYNCcommand fails because the incarnation has not been reset in the catalog. % rman target / catalog rman/rman@catdb Recovery Manager: Release 9.2.0.0.0 - Production (c) Copyright 2001 Oracle Corporation. All rights reserved. connected to target database: TRGT (DBID=1334531173) connected to recovery catalog database RMAN> RESYNC CATALOG; RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03009: failure of resync command on default channel at 11/01/2001 12:00:43 RMAN-20003: target database incarnation not found in recovery catalog RMAN> RESET DATABASE; new incarnation of database registered in recovery catalog starting full resync of recovery catalog full resync complete
|
![]() Copyright © 1996, 2002 Oracle Corporation. All Rights Reserved. |
|