Issue with Oracle 8i recovery
Date: Tue, 6 Oct 2009 06:03:37 -0700 (PDT)
Message-ID: <9c394e80-6fb6-4258-90d7-a74e00023b62_at_j9g2000vbp.googlegroups.com>
I am using 8i (8.1.7) on windows 2k SP4 with no recovery catalog. I am facing issues in recovery from control file backups. I am trying to do redirected restore from Machine A to Machine B. On Machine B I have prepared the instance with the same name and DB ID.
I have three backups and I can restore only through the first (oldest)
backup. Please see below the procedure I am following to restore:
(Followed the procedure listed in
http://download-west.oracle.com/docs/cd/A81042_01/DOC/server.816/a76990/rmanreco.htm
in section "To restore from HOST_A to HOST_B without a recovery
catalog:")
- Copy the control files to machine B
- Get the SCN by executing the query:
SQL> SELECT min(scn) 2 FROM (SELECT max(next_change#) scn 3 FROM v$archived_log 4 GROUP BY thread#);
MIN(SCN)
362799
- Run following RMAN script
RUN { ALLOCATE CHANNEL ch0 TYPE 'SBT_TAPE';
RESTORE DATABASE UNTIL SCN 362799;
RECOVER DATABASE UNTIL SCN 362799;
RELEASE CHANNEL ch0;
alter database open resetlogs;
}
This works correctly for the first backup. And I can get the instance up and running. Please note the output of "list backup" at this point of time below: Output shows the maximum SCN is 362797.
RMAN> list backup;
RMAN-03022: compiling command: list
List of Backup Sets
Key Recid Stamp LV Set Stamp Set Count Completion Time
------- ---------- ---------- -- ---------- ----------
1 1 698720723 0 698720644 1 28-SEP-09 List of Backup Pieces
Key Pc# Cp# Status Completion Time Piece Name
- --- --- ----------- ----------------------
1 1 1 AVAILABLE 28-SEP-09 BE_01kqb8c4_1_1
List of Datafiles Included
File Name LV Type Ckp SCN CkpTime
- ------------------------------------- -- ---- ----------
1 C:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF 0 Full 362797 28- SEP-09 2 C:\ORACLE\ORADATA\ORCL\RBS01.DBF 0 Full 362797 28- SEP-09 3 C:\ORACLE\ORADATA\ORCL\USERS01.DBF 0 Full 362797 28- SEP-09 4 C:\ORACLE\ORADATA\ORCL\TEMP01.DBF 0 Full 362797 28- SEP-09 5 C:\ORACLE\ORADATA\ORCL\TOOLS01.DBF 0 Full 362797 28- SEP-09 6 C:\ORACLE\ORADATA\ORCL\INDX01.DBF 0 Full 362797 28- SEP-09 7 C:\ORACLE\ORADATA\ORCL\DR01.DBF 0 Full 362797 28- SEP-09 8 C:\ORACLE\ORADATA\ORCL\TEST01.DBF 0 Full 362797 28- SEP-09
Now the problem is if I restore control files from the second or third backup then for the above mentioned RMAN script I get following error:
RMAN-06003: ORACLE error from target database: RMAN-20208: UNTIL CHANGE is before RESETLOGS change
Please note that query to get SCN still returns me 362799 so I had to use 362799 in the RMAN script.
SQL> SELECT min(scn)
2 FROM (SELECT max(next_change#) scn
3 FROM v$archived_log 4 GROUP BY thread#);
MIN(SCN)
362799
Please note the output of the list backup command at this point:
RMAN> list backup;
RMAN-03022: compiling command: list
List of Backup Sets
Key Recid Stamp LV Set Stamp Set Count Completion Time
------- ---------- ---------- -- ---------- ----------
1 1 698720723 0 698720644 1 28-SEP-09 List of Backup Pieces
Key Pc# Cp# Status Completion Time Piece Name
- --- --- ----------- ----------------------
1 1 1 AVAILABLE 28-SEP-09 BE_01kqb8c4_1_1
List of Datafiles Included
File Name LV Type Ckp SCN CkpTime
- ------------------------------------- -- ---- ----------
1 C:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF 0 Full 362797 28- SEP-09 2 C:\ORACLE\ORADATA\ORCL\RBS01.DBF 0 Full 362797 28- SEP-09 3 C:\ORACLE\ORADATA\ORCL\USERS01.DBF 0 Full 362797 28- SEP-09 4 C:\ORACLE\ORADATA\ORCL\TEMP01.DBF 0 Full 362797 28- SEP-09 5 C:\ORACLE\ORADATA\ORCL\TOOLS01.DBF 0 Full 362797 28- SEP-09 6 C:\ORACLE\ORADATA\ORCL\INDX01.DBF 0 Full 362797 28- SEP-09 7 C:\ORACLE\ORADATA\ORCL\DR01.DBF 0 Full 362797 28- SEP-09 8 C:\ORACLE\ORADATA\ORCL\TEST01.DBF 0 Full 362797 28- SEP-09
Key Recid Stamp LV Set Stamp Set Count Completion Time ------- ---------- ---------- -- ---------- ----------
4 4 698939872 0 698939794 5 30-SEP-09 List of Backup Pieces
Key Pc# Cp# Status Completion Time Piece Name
- --- --- ----------- ----------------------
4 1 1 AVAILABLE 30-SEP-09 BE_05kqhuci_1_1
List of Datafiles Included
File Name LV Type Ckp SCN CkpTime
- ------------------------------------- -- ---- ----------
1 C:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF 0 Full 362846 30- SEP-09 2 C:\ORACLE\ORADATA\ORCL\RBS01.DBF 0 Full 362846 30- SEP-09 3 C:\ORACLE\ORADATA\ORCL\USERS01.DBF 0 Full 362846 30- SEP-09 4 C:\ORACLE\ORADATA\ORCL\TEMP01.DBF 0 Full 362846 30- SEP-09 5 C:\ORACLE\ORADATA\ORCL\TOOLS01.DBF 0 Full 362846 30- SEP-09 6 C:\ORACLE\ORADATA\ORCL\INDX01.DBF 0 Full 362846 30- SEP-09 7 C:\ORACLE\ORADATA\ORCL\DR01.DBF 0 Full 362846 30- SEP-09 8 C:\ORACLE\ORADATA\ORCL\TEST01.DBF 0 Full 362846 30- SEP-09
Key Recid Stamp LV Set Stamp Set Count Completion Time ------- ---------- ---------- -- ---------- ----------
6 6 699098593 0 699098517 7 01-OCT-09 List of Backup Pieces
Key Pc# Cp# Status Completion Time Piece Name
- --- --- ----------- ----------------------
6 1 1 AVAILABLE 01-OCT-09 BE_07kqmpcl_1_1
List of Datafiles Included
File Name LV Type Ckp SCN CkpTime
- ------------------------------------- -- ---- ----------
1 C:\ORACLE\ORADATA\ORCL\SYSTEM01.DBF 0 Full 362902 01- OCT-09 2 C:\ORACLE\ORADATA\ORCL\RBS01.DBF 0 Full 362902 01- OCT-09 3 C:\ORACLE\ORADATA\ORCL\USERS01.DBF 0 Full 362902 01- OCT-09 4 C:\ORACLE\ORADATA\ORCL\TEMP01.DBF 0 Full 362902 01- OCT-09 5 C:\ORACLE\ORADATA\ORCL\TOOLS01.DBF 0 Full 362902 01- OCT-09 6 C:\ORACLE\ORADATA\ORCL\INDX01.DBF 0 Full 362902 01- OCT-09 7 C:\ORACLE\ORADATA\ORCL\DR01.DBF 0 Full 362902 01- OCT-09 8 C:\ORACLE\ORADATA\ORCL\TEST01.DBF 0 Full 362902 01- OCT-09
Can anyone let me know what I need to do to restore and recover from my second / third backups.
Thanks in advance,
Ganesh Tambat
Received on Tue Oct 06 2009 - 08:03:37 CDT