Skip Headers

Oracle9i Recovery Manager Reference
Release 2 (9.2)

Part Number A96565-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go to next page

RMAN Commands , 45 of 59


RESET DATABASE

Syntax

Text description of reset.gif follows
Text description of the illustration reset.gif


Purpose

To reset the target database in the RMAN repository, which means to do either of the following actions:

Restrictions and Usage Notes

Keywords and Parameters

Syntax Element Description

TO INCARNATION primary_key

Changes the current incarnation to an older incarnation. Specify the primary key of the DBINC record for the database incarnation. Run LIST INCARNATION OF DATABASE to obtain the key. After you start the instance and issue RESET DATABASE TO INCARNATION, then you can mount or restore a control file from the desired incarnation and run RMAN commands.

Examples

Resetting RMAN to a Previous Incarnation: Example

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
Resetting the Database After Incomplete Recovery: Example
This example 
assumes that an incomplete recovery or recovery with a backup control file was 
performed in NOCATALOG mode. Later, RMAN is started in CATALOG mode, but the 
RESYNC command 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

Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback