Database Recovery using RMAN.
579677Dec 21 2007 — edited Dec 21 2007Hi all,
I have a weird problem and I need help please.
I perform a hot backup of the database using RMAN with the following commands:
run {
ALLOCATE CHANNEL C1 TYPE DISK;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP format '$dir/level0' DATABASE include current controlfile for standby FORCE;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP ARCHIVELOG ALL format '$dir/archivelogs_%s_%t' FORCE;
BACKUP CURRENT CONTROLFILE format '$dir/control_primary' FORCE;
}
After the backup is done, I run the following command to check the contents of the backupsets and this is what I get:
……………..
…………………
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
906 107K DISK 00:00:01 20-DEC-07
BP Key: 667 Status: AVAILABLE Tag: TAG20071220T214140
Piece Name: /tmp/CEMSDB_BACKUP_2007_12_20_21:40:36/archivelogs_926_641857300
List of Archived Logs in backup set 906
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1 4370459 20-DEC-07 4370775 20-DEC-07
1 2 4370775 20-DEC-07 4370781 20-DEC-07
1 3 4370781 20-DEC-07 4370784 20-DEC-07
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
907 Full 1M DISK 00:00:00 20-DEC-07
BP Key: 668 Status: AVAILABLE Tag: TAG20071220T214142
Piece Name: /tmp/CEMSDB_BACKUP_2007_12_20_21:40:36/control_primary
Controlfile Included: Ckp SCN: 4370784 Ckp time: 20-DEC-07
After the backup was completed, all the data files, control files, online redo logs and archived redo logs were deleted .
I restored the controle file and the database successfully and when I tried to perform a recovery using
run {
RECOVER DATABASE;
}
This one fails complaining about thread 1 scn 4370784 as you can see here:
starting media recovery
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=2
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=3
channel ORA_DISK_1: restored backup piece 1
piece handle=/tmp/CEMSDB_BACKUP_2007_12_20_21:40:36/archivelogs_926_641857300 tag=TAG20071220T214140 params=NULL
channel ORA_DISK_1: restore complete
archive log filename=/opt/cems/db/oracle/u06/oradata/CEMSDB/1_2.dbf thread=1 sequence=2
archive log filename=/opt/cems/db/oracle/u06/oradata/CEMSDB/1_3.dbf thread=1 sequence=3
unable to find archive log
archive log thread=1 sequence=4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 12/20/2007 21:49:46
RMAN-06054: media recovery requesting unknown log: thread 1 scn 4370784
Recovery Manager complete.
My question is :
Why RMAN is expecting archive log
archive log thread=1 sequence=4 which was never generated?
Thanks,
Simo.