Tuesday, August 7, 2012

If you have multiple occurences of CURRENT incarnations, consider cleaning up the records in the controlfile, as I do in the below example:

oracle@myserver:[mydb01]# rman target / rcvcat rman/****@rmancat

connected to target database: MYDB01 (DBID=3046916437)

connected to recovery catalog database

 RMAN> list incarnation of database;

List of Database Incarnations

DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
115480009 115480162 MYDB01 3041018695       PARENT  4645705584 21-NOV-08
115480009 115480010 MYDB01 3041018695       CURRENT 68958491179 18-APR-11 -- the oldest "current" record
133048143 133048296 MYDB01 3046916437       PARENT  4645705584 21-NOV-08
133048143 133048144 MYDB01 3046916437       CURRENT 69343324169 24-JUN-11


RMAN> list db_unique_name of database;

List of Databases

DB Key  DB Name  DB ID            Database Role    Db_unique_name
------- ------- ----------------- ---------------  ------------------
115480009 MYDB01 3041018695       PRIMARY          MVAP
133048143 MYDB01 3046916437       PRIMARY          MVAP

oracle@myserver:[mydb01]# rman  rcvcat rman/****@rmancat

Recovery Manager: Release 11.2.0.4.0 - Production on On Mar 11 14:25:59 2015

 Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to recovery catalog.

RMAN> set dbid 3041018695;

Executing command: SET DBID

Database name is MYDB01 and DBID is 3041018695

RMAN> unregister database;

database name is MYDB01 and DBID is 3041018695

Do you really want to unregister the database(respond YES or NO)? YES

Database was unregistrered.

RMAN> list incarnation of database;

List of Database Incarnations

DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN  Reset Time
------- ------- -------- ---------------- --- ---------- ----------
133048143 133048296 MYDB01 3046916437       PARENT  4645705584 21-NOV-08
133048143 133048144 MYDB01 3046916437       CURRENT 69343324169 24-JUN-11

No comments:

Post a Comment