Link to home
Start Free TrialLog in
Avatar of peledc
peledc

asked on

RMAN: recover on a diferent server

Hi,

Oracle 9.2
OS is Win2K

I perform daily backups with RMAN (without a catalog).
I'm practicing recovery modes and I manage to recover from many scenarios.
I have problems understanding how to perform a complete recovery after the Server has crashed and I install Oracle software on a different server with a new IP.

I would be greatfull if you could direct me with the correct action items.
This question is only addressed to those who have actually done it.

My RMAN backup is:
run {
SQL "ALTER SYSTEM ARCHIVE LOG CURRENT";
allocate channel c1 device type disk format 'd:\oracle\backup\%U';
backup database ;
backup archivelog all delete input;
}


Thanks
Peled
Avatar of schwertner
schwertner
Flag of Antarctica image

I did this on 9i. I wrote a 12 pages protocol of this adventure. Will post here the most important part.

The datapieces 03FCOI5E_1_1 and  04FCOIHE_1_1  
were transferred to the new host machine “shvertner”.

       
Transfer INIT.ORA file from the target to the cloning instance.
Change all data file locations mentioned in the INIT.ORA file.

Transfer the password file PWDmain.ora   file. (…\ora92\database)


RMAN is alias for connecting to the duplicate database.


SQL> connect sys/reks@rman as sysdba
Connected.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount
ORACLE instance started.

Total System Global Area  118562548 bytes
Fixed Size                   454388 bytes
Variable Size              83886080 bytes
Database Buffers           33554432 bytes
Redo Buffers                 667648 bytes
SQL>
SQL>alter database mount
RMAN>connect   target sys/reks@rman


    run{
      allocate channel c1 type disk;
      restore controlfile;
    }



Change the password file with the password file from the target database to avoid the error message:

SQL> alter database mount;
alter database mount
*
ERROR at line 1:
ORA-01991: invalid password file 'D:\oracle\ora92\DATABASE\PWDmain.ORA'

Now you have to use the passwords from the old target database (in my case the MAIN instance from the ‘main’ computer!


SQL> alter database mount;


RMAN> @restore.txt
 

    run {  
     allocate channel c1 type disk;
     allocate channel c2 type disk;
     allocate channel c3 type disk;  
     set newname for datafile         1  to 'D:\ORACLE\ORADATA\MAIN\SYSTEM01.DBF';
     set newname for datafile         2  to 'D:\ORACLE\ORADATA\MAIN\UNDOTBS01.DBF';
     set newname for datafile         3  to 'D:\ORACLE\ORADATA\MAIN\CWMLITE01.DBF';
     set newname for datafile         4  to 'D:\ORACLE\ORADATA\MAIN\DRSYS01.DBF';
     set newname for datafile         5  to 'D:\ORACLE\ORADATA\MAIN\EXAMPLE01.DBF';
     set newname for datafile         6  to 'D:\ORACLE\ORADATA\MAIN\INDX01.DBF';
     set newname for datafile         7  to 'D:\ORACLE\ORADATA\MAIN\ODM01.DBF';
     set newname for datafile         8  to 'D:\ORACLE\ORADATA\MAIN\TOOLS01.DBF';
     set newname for datafile         9  to 'D:\ORACLE\ORADATA\MAIN\USERS01.DBF';
     set newname for datafile        10  to 'D:\ORACLE\ORADATA\MAIN\XDB01.DBF';
     set newname for datafile        11  to 'D:\ORACLE\ORADATA\MAIN\TSDC00.DBF';
     set newname for datafile        12  to 'D:\ORACLE\ORADATA\MAIN\TSDCONTACTS00.DBF';
     set newname for datafile        13  to 'D:\ORACLE\ORADATA\MAIN\TSICONTACTS00.DBF';
     set newname for datafile        14  to 'D:\ORACLE\ORADATA\MAIN\TSDCONTAINER00.DBF';
     set newname for datafile        15  to 'D:\ORACLE\ORADATA\MAIN\TSICONTAINER00.DBF';
     set newname for datafile        16  to 'D:\ORACLE\ORADATA\MAIN\TSDDOCUMENTS00.DBF';
     set newname for datafile        17  to 'D:\ORACLE\ORADATA\MAIN\TSIDOCUMENTS00.DBF';
     set newname for datafile        18  to 'D:\ORACLE\ORADATA\MAIN\TSDIDMAP00.DBF';
     set newname for datafile        19  to 'D:\ORACLE\ORADATA\MAIN\TSIIDMAP00.DBF';
     set newname for datafile        20  to 'D:\ORACLE\ORADATA\MAIN\TSDMEDICAL00.DBF';
     set newname for datafile        21  to 'D:\ORACLE\ORADATA\MAIN\TSIMEDICAL00.DBF';
     set newname for datafile        22  to 'D:\ORACLE\ORADATA\MAIN\TSDSYSTEM00.DBF';
     set newname for datafile        23  to 'D:\ORACLE\ORADATA\MAIN\TSISYSTEM00.DBF';
     set newname for datafile        24  to 'D:\ORACLE\ORADATA\MAIN\TSDAUDIT00.DBF';
     set newname for datafile        25  to 'D:\ORACLE\ORADATA\MAIN\TSIAUDIT00.DBF';
     set newname for datafile        26  to 'D:\ORACLE\ORADATA\MAIN\TSROLLBACKSMALL00.DBF';
     set newname for datafile        27  to 'D:\ORACLE\ORADATA\MAIN\TSROLLBACKLARGE00.DBF';
     set newname for datafile        28  to 'D:\ORACLE\ORADATA\MAIN\TSIC00.DBF';
     set newname for datafile        29  to 'D:\ORACLE\ORADATA\MAIN\TSDT00.DBF';
     set newname for datafile        30  to 'D:\ORACLE\ORADATA\MAIN\TSIT00.DBF';
     set newname for datafile        31  to 'D:\ORACLE\ORADATA\MAIN\TSDD00.DBF';
     set newname for datafile        32  to 'D:\ORACLE\ORADATA\MAIN\TSID00.DBF';
     set newname for datafile        33  to 'D:\ORACLE\ORADATA\MAIN\TSDI00.DBF';
     set newname for datafile        34  to 'D:\ORACLE\ORADATA\MAIN\TSII00.DBF';
     set newname for datafile        35  to 'D:\ORACLE\ORADATA\MAIN\TSDM00.DBF';
     set newname for datafile        36  to 'D:\ORACLE\ORADATA\MAIN\TSIM00.DBF';
     set newname for datafile        37  to 'D:\ORACLE\ORADATA\MAIN\TSDS00.DBF';
     set newname for datafile        38  to 'D:\ORACLE\ORADATA\MAIN\TSIS00.DBF';
     set newname for datafile        39  to 'D:\ORACLE\ORADATA\MAIN\TSDA00.DBF';
     set newname for datafile        40  to 'D:\ORACLE\ORADATA\MAIN\TSIA00.DBF';
     set newname for datafile        41  to 'D:\ORACLE\ORADATA\MAIN\TSRS00.DBF';
     set newname for datafile        42  to 'D:\ORACLE\ORADATA\MAIN\TSRL00.DBF';
     restore database;
    }


SQL> select name from v$datafile;

D:\ORACLE\ORADATA\MAIN\SYSTEM01.DBF
D:\ORACLE\ORADATA\MAIN\UNDOTBS01.DBF
D:\ORACLE\ORADATA\MAIN\CWMLITE01.DBF
D:\ORACLE\ORADATA\MAIN\DRSYS01.DBF
D:\ORACLE\ORADATA\MAIN\EXAMPLE01.DBF
D:\ORACLE\ORADATA\MAIN\INDX01.DBF
D:\ORACLE\ORADATA\MAIN\ODM01.DBF
D:\ORACLE\ORADATA\MAIN\TOOLS01.DBF
D:\ORACLE\ORADATA\MAIN\USERS01.DBF
D:\ORACLE\ORADATA\MAIN\XDB01.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDC00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDCONTACTS00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSICONTACTS00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDCONTAINER00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSICONTAINER00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDDOCUMENTS00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIDOCUMENTS00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDIDMAP00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIIDMAP00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDMEDICAL00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIMEDICAL00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDSYSTEM00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSISYSTEM00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDAUDIT00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIAUDIT00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSROLLBACKSMALL00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSROLLBACKLARGE00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIC00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDT00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIT00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDD00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSID00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDI00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSII00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDM00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIM00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDS00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIS00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDA00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIA00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSRS00.DBF
E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSRL00.DBF

42 rows selected.
===============================================================

alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\SYSTEM01.DBF'   to 'D:\ORACLE\ORADATA\MAIN\SYSTEM01.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\UNDOTBS01.DBF'  to 'D:\ORACLE\ORADATA\MAIN\UNDOTBS01.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\CWMLITE01.DBF'  to 'D:\ORACLE\ORADATA\MAIN\CWMLITE01.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\DRSYS01.DBF'    to 'D:\ORACLE\ORADATA\MAIN\DRSYS01.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\EXAMPLE01.DBF'  to 'D:\ORACLE\ORADATA\MAIN\EXAMPLE01.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\INDX01.DBF'     to 'D:\ORACLE\ORADATA\MAIN\INDX01.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\ODM01.DBF'      to 'D:\ORACLE\ORADATA\MAIN\ODM01.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TOOLS01.DBF'    to 'D:\ORACLE\ORADATA\MAIN\TOOLS01.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\USERS01.DBF'  to 'D:\ORACLE\ORADATA\MAIN\USERS01.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\XDB01.DBF'  to 'D:\ORACLE\ORADATA\MAIN\XDB01.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDC00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDC00.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDCONTACTS00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDCONTACTS00.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSICONTACTS00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSICONTACTS00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDCONTAINER00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDCONTAINER00.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSICONTAINER00.DBF'  to 'D:\ORACLE\ORADATA\MAIN\TSICONTAINER00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDDOCUMENTS00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDDOCUMENTS00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIDOCUMENTS00.DBF'  to 'D:\ORACLE\ORADATA\MAIN\TSIDOCUMENTS00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDIDMAP00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDIDMAP00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIIDMAP00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIIDMAP00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDMEDICAL00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDMEDICAL00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIMEDICAL00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIMEDICAL00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDSYSTEM00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDSYSTEM00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSISYSTEM00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSISYSTEM00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDAUDIT00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDAUDIT00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIAUDIT00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIAUDIT00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSROLLBACKSMALL00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSROLLBACKSMALL00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSROLLBACKLARGE00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSROLLBACKLARGE00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIC00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIC00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDT00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDT00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIT00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIT00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDD00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDD00.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSID00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSID00.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDI00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDI00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSII00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSII00.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDM00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDM00.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIM00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIM00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDS00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDS00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIS00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIS00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSDA00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSDA00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSIA00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSIA00.DBF';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSRS00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSRS00.DBF';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\TSRL00.DBF' to 'D:\ORACLE\ORADATA\MAIN\TSRL00.DBF';


alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\REDO01.LOG' to 'D:\ORACLE\ORADATA\MAIN\REDO01.LOG';
alter database rename file 'E:\ORACLE_DB_MAIN\ORADATA\MAIN\REDO02.LOG' to 'D:\ORACLE\ORADATA\MAIN\REDO02.LOG';
alter database rename file  'E:\ORACLE_DB_MAIN\ORADATA\MAIN\REDO03.LOG' to 'D:\ORACLE\ORADATA\MAIN\REDO03.LOG';

SQL> select name from v$datafile;

NAME
------------------------------------------------------------
D:\ORACLE\ORADATA\MAIN\SYSTEM01.DBF
D:\ORACLE\ORADATA\MAIN\UNDOTBS01.DBF
D:\ORACLE\ORADATA\MAIN\CWMLITE01.DBF
D:\ORACLE\ORADATA\MAIN\DRSYS01.DBF
D:\ORACLE\ORADATA\MAIN\EXAMPLE01.DBF
D:\ORACLE\ORADATA\MAIN\INDX01.DBF
D:\ORACLE\ORADATA\MAIN\ODM01.DBF
D:\ORACLE\ORADATA\MAIN\TOOLS01.DBF
D:\ORACLE\ORADATA\MAIN\USERS01.DBF
D:\ORACLE\ORADATA\MAIN\XDB01.DBF
D:\ORACLE\ORADATA\MAIN\TSDC00.DBF
D:\ORACLE\ORADATA\MAIN\TSDCONTACTS00.DBF
D:\ORACLE\ORADATA\MAIN\TSICONTACTS00.DBF
D:\ORACLE\ORADATA\MAIN\TSDCONTAINER00.DBF
D:\ORACLE\ORADATA\MAIN\TSICONTAINER00.DBF
D:\ORACLE\ORADATA\MAIN\TSDDOCUMENTS00.DBF
D:\ORACLE\ORADATA\MAIN\TSIDOCUMENTS00.DBF
D:\ORACLE\ORADATA\MAIN\TSDIDMAP00.DBF
D:\ORACLE\ORADATA\MAIN\TSIIDMAP00.DBF
D:\ORACLE\ORADATA\MAIN\TSDMEDICAL00.DBF
D:\ORACLE\ORADATA\MAIN\TSIMEDICAL00.DBF
D:\ORACLE\ORADATA\MAIN\TSDSYSTEM00.DBF
D:\ORACLE\ORADATA\MAIN\TSISYSTEM00.DBF
D:\ORACLE\ORADATA\MAIN\TSDAUDIT00.DBF
D:\ORACLE\ORADATA\MAIN\TSIAUDIT00.DBF
D:\ORACLE\ORADATA\MAIN\TSROLLBACKSMALL00.DBF
D:\ORACLE\ORADATA\MAIN\TSROLLBACKLARGE00.DBF
D:\ORACLE\ORADATA\MAIN\TSIC00.DBF
D:\ORACLE\ORADATA\MAIN\TSDT00.DBF
D:\ORACLE\ORADATA\MAIN\TSIT00.DBF
D:\ORACLE\ORADATA\MAIN\TSDD00.DBF
D:\ORACLE\ORADATA\MAIN\TSID00.DBF
D:\ORACLE\ORADATA\MAIN\TSDI00.DBF
D:\ORACLE\ORADATA\MAIN\TSII00.DBF
D:\ORACLE\ORADATA\MAIN\TSDM00.DBF
D:\ORACLE\ORADATA\MAIN\TSIM00.DBF
D:\ORACLE\ORADATA\MAIN\TSDS00.DBF
D:\ORACLE\ORADATA\MAIN\TSIS00.DBF
D:\ORACLE\ORADATA\MAIN\TSDA00.DBF
D:\ORACLE\ORADATA\MAIN\TSIA00.DBF
D:\ORACLE\ORADATA\MAIN\TSRS00.DBF
D:\ORACLE\ORADATA\MAIN\TSRL00.DBF

42 rows selected.

===============================================================

SQL> alter database open resetlogs;

RESETLOGS Specify RESETLOGS to reset the current log sequence number to 1
and discards any redo information that was not applied during recovery, ensuring
that it will never be applied. This effectively discards all changes that are in the redo
log, but not in the database.
You must specify RESETLOGS to open the database after performing media
recovery with an incomplete recovery using the RECOVER clause or with a backup
control file. After opening the database with this clause, you should perform a
complete database backup.


THE DATABASE IS RESTORED AT THE DIFFERENT NODE (HOST).

Unexpected side effect:  On the computer on which I work in tnsnames.ora file the host of the MAIN alias was silently changed from “main’ to “shvertner”. 5 days I did not notice this!!!


Problems with RMAN after the restoring:

RMAN> list backup;
(connected to the old or to the new created target database)

results error:

RMAN-20003: target database incarnation not found in recovery catalog

RMAN> list incarnation;

Lists one incarnation in the recovery catalog.

DB Key  Inc Key   DB Name  DB ID        CUR  Reset SCN   Reset Time
______  ________  ________ ___________  ___  _________   ___________
1                   2         MAIN     200722603    YES  190578      24-SEP-03

FIX:

RMAN> reset database;

New incarnation of the database registered in recovery catalog
Starting full resync of recovery catalog
Full resync complete

SURPRISE:
Instead the directory E:\ORACLE_DB_MAIN\ORADATA\MAIN\SYSTEM01.DBF
the new database directory was displayed: D:\ORACLE\ORADATA\MAIN\SYSTEM01.DBF

RMAN> list incarnation;

Lists TWO incarnations in the recovery catalog.

DB Key  Inc Key   DB Name  DB ID        CUR  Reset SCN   Reset Time
______  ________  ________ ___________  ___  _________   ___________
1                     2         MAIN     200722603    NO   190578         24-SEP-03
1                   951       MAIN     200722603    YES  44011554    06-FEB-04

How to reset using the OLD incarnation?
 Look in:
Note:1070453.6
RMAN Point-in-Time Recovery of a Backup From Before Last Resetlogs

RMAN>reset database to incarnation 2;

Look in:
Note:48364.1
OERR RMAN 20011 target database incarnation is not current in recovery catalog



Resetting RMAN to a Previous Incarnation: (DO NOT EXPERIMENT!!!!)
2-174 Oracle9 i Recovery Manager Reference
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


See also:
Managing the Recovery Manager Repository 16-1
RMAN User’s guide

See also:
Maintaining RMAN Repository  Note125303.1
ASKER CERTIFIED SOLUTION
Avatar of schwertner
schwertner
Flag of Antarctica image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial