Question about the CATALOG START WITH command
Hi,
I have a question about the RMAN's CATALOG command. I have a test database where I test the restore and recovery procedures. So I performed a DROP DATABASE command and wanted to restore the database from backups. I first restored the SPFILE, converted it to PFILE, modified it properly and started the instance with it. Next I restored the control file from a backupset with the command:
RMAN> RESTORE CONTROLFILE FROM 'c:\backups\C-4151838043-20080813-01';
Starting restore at 2008-08-20 16:09:13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:02
output filename=E:\ORADATA\TESTDB\CONTROL01.CTL
output filename=E:\ORADATA\TESTDB\CONTROL02.CTL
output filename=E:\ORADATA\TESTDB\CONTROL03.CTL
Finished restore at 2008-08-20 16:09:19
Next, I mounted the database and displayed the incarnations:
RMAN> alter database mount;
database mounted
released channel: ORA_DISK_1
RMAN> list incarnation of database;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 TESTDB 4151838043 PARENT 1 2005-08-30 13:49:56
2 2 TESTDB 4151838043 CURRENT 534907 2007-11-08 08:25:01
Ok, and now the strange thing. I executed the CATALOG START WITH command to catalog all the files in the directory C:\backups:
RMAN> catalog start with 'C:\backups\';
Starting implicit crosscheck backup at 2008-08-20 16:10:31
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=155 devtype=DISK
Crosschecked 12 objects
Finished implicit crosscheck backup at 2008-08-20 16:10:32
Starting implicit crosscheck copy at 2008-08-20 16:10:32
using channel ORA_DISK_1
Finished implicit crosscheck copy at 2008-08-20 16:10:32
searching for all files in the recovery area
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\TESTDB\ARCHIVELOG\2008_08_18\O1_MF_1_1_4BL
D133F_.ARC
File Name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\TESTDB\ARCHIVELOG\2008_08_18\O1_MF_1_2_4BL
D1XX9_.ARC
searching for all files that match the pattern C:\backups\
List of Files Unknown to the Database
=====================================
File Name: C:\BACKUPS\13JNSVVA_1_1
File Name: C:\BACKUPS\15JNT5T5_1_1
File Name: C:\BACKUPS\1BJNVRF2_1_1
File Name: C:\BACKUPS\C-4151838043-20080813-01
Do you really want to catalog the above files (enter YES or NO)? y
cataloging files...
cataloging done
List of Cataloged Files
=======================
File Name: C:\BACKUPS\13JNSVVA_1_1
File Name: C:\BACKUPS\15JNT5T5_1_1
File Name: C:\BACKUPS\1BJNVRF2_1_1
File Name: C:\BACKUPS\C-4151838043-20080813-01
The problem is that I still had two archived redo log files in the Flash Recovery Area from the previous database and they were cataloged too. How is that possible? The manual states that to catalog the files in the Flash Recovery Area, it's necessary to execute CATALOG RECOVERY AREA and that CATALOG START WITH should catalog only the files in the given directory and its subdirectories.
The problem of such behavior is that a new database incarnation is created:
RMAN> list incarnation of database;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 TESTDB 4151838043 PARENT 1 2005-08-30 13:49:56
2 2 TESTDB 4151838043 PARENT 534907 2007-11-08 08:25:01
3 3 TESTDB 4151838043 CURRENT 23120314 2008-08-18 09:56:45
And if i try to recover the database I can't since I have to perform incomplete recovery up to the SCN of the last archived redo log in the backup which has a lower SCN than the SCN of the incarnation listed above. Ok, I solved the problem by deleting the two archived redo logs and repeating the whole procedure, but is it such a behavior normal?
Thanks for any answers.
Regards,
Jure