RMAN full recovery of database using latest archivelogs [message #448121] |
Fri, 19 March 2010 11:06 |
aviana
Messages: 106 Registered: July 2007
|
Senior Member |
|
|
Hi,
I am practising Disaster recovery scenarios in the DR box from the RMAN backups taken from LIVE.
I now can recover the DRBox until the latest RMAN backup time.
(4 AM everyday)
so I have the backupset until 4AM today and I am doing the recovery at 3PM today.
Now, my final steps for RMAN recovery and the output are below:
RMAN> recover database;
Starting recover at 19-MAR-10
using channel ORA_DISK_1
starting media recovery
channel ORA_DISK_1: starting archived log restore to default destination
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2008
channel ORA_DISK_1: restoring archived log
archived log thread=1 sequence=2009
channel ORA_DISK_1: reading from backup piece H:\ORACLE\FLASH_RECOVERY_AREA\GEOP\BACKUPSET\2010_03_19\O1_MF_ANNNN_TAG20100319T042001_5T
5YVM63_.BKP
channel ORA_DISK_1: piece handle=H:\ORACLE\FLASH_RECOVERY_AREA\GEOP\BACKUPSET\2010_03_19\O1_MF_ANNNN_TAG20100319T042001_5T5YVM63_.BKP t
ag=TAG20100319T042001
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:01:05
archived log file name=H:\ORACLE\FLASH_RECOVERY_AREA\GEOP\ARCHIVELOG\2010_03_19\O1_MF_1_2008_5T76PMBQ_.ARC thread=1 sequence=2008
channel default: deleting archived log(s)
archived log file name=H:\ORACLE\FLASH_RECOVERY_AREA\GEOP\ARCHIVELOG\2010_03_19\O1_MF_1_2008_5T76PMBQ_.ARC RECID=1817 STAMP=714066009
archived log file name=H:\ORACLE\FLASH_RECOVERY_AREA\GEOP\ARCHIVELOG\2010_03_19\O1_MF_1_2009_5T76PMG5_.ARC thread=1 sequence=2009
channel default: deleting archived log(s)
archived log file name=H:\ORACLE\FLASH_RECOVERY_AREA\GEOP\ARCHIVELOG\2010_03_19\O1_MF_1_2009_5T76PMG5_.ARC RECID=1816 STAMP=714066003
unable to find archived log
archived log thread=1 sequence=2010
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 03/19/2010 15:40:23
RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 2010 and starting SCN of 27359579548
Here, the archivelog requested is not backed up by RMAN yet, i.e they have not yet gone to the backup sets, they will go only tomorrow at 4AM.Please see below:
RMAN> list backup of archivelog from time 'sysdate-1';
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
198 259.73M DISK 00:01:25 19-MAR-10
BP Key: 198 Status: AVAILABLE Compressed: YES Tag: TAG20100319T042001
Piece Name: H:\ORACLE\FLASH_RECOVERY_AREA\GEOP\BACKUPSET\2010_03_19\O1_MF_ANNNN_TAG20100319T042001_5T5YVM63_.BKP
List of Archived Logs in backup set 198
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 1995 27358899118 18-MAR-10 27359418062 18-MAR-10
1 1996 27359418062 18-MAR-10 27359419133 18-MAR-10
1 1997 27359419133 18-MAR-10 27359419235 18-MAR-10
1 1998 27359419235 18-MAR-10 27359419330 18-MAR-10
1 1999 27359419330 18-MAR-10 27359419596 18-MAR-10
1 2000 27359419596 18-MAR-10 27359419833 18-MAR-10
1 2001 27359419833 18-MAR-10 27359420018 18-MAR-10
1 2002 27359420018 18-MAR-10 27359420108 18-MAR-10
1 2003 27359420108 18-MAR-10 27359420928 18-MAR-10
1 2004 27359420928 18-MAR-10 27359421726 18-MAR-10
1 2005 27359421726 18-MAR-10 27359426284 19-MAR-10
1 2006 27359426284 19-MAR-10 27359467976 19-MAR-10
1 2007 27359467976 19-MAR-10 27359529406 19-MAR-10
1 2008 27359529406 19-MAR-10 27359579540 19-MAR-10
1 2009 27359579540 19-MAR-10 27359579548 19-MAR-10
Anyhow I have the backup of those archivelogs(from 4AM until 3PM) in a different folder named ARCHIVELOGS(sequence 2010 ) in a format known to RMAN.
Can someone please tell what commands I should use to get the database uptodate until 3PM(or upto a time until whatever is the latest archivelogs available in RMAN)
[Updated on: Fri, 19 March 2010 11:24] Report message to a moderator
|
|
|
|
Re: RMAN full recovery of database using latest archivelogs [message #449840 is a reply to message #448181] |
Thu, 01 April 2010 05:37 |
aviana
Messages: 106 Registered: July 2007
|
Senior Member |
|
|
Hi it didnt made a difference..
1)RMAN is not aware of the latest archive logs created during the day by the primary database after 4AM, so how to make RMAN aware of it..?Can I get all the commands for that, also for restoring and recovering only these new archivelogs generated during the day?
2)Does the whole cataloging,restoring and recovery need to be performed just for the archivelogs again, as the required archivelogs are not showing in the present backupset.
|
|
|
|
Re: RMAN full recovery of database using latest archivelogs [message #449854 is a reply to message #449851] |
Thu, 01 April 2010 08:18 |
aviana
Messages: 106 Registered: July 2007
|
Senior Member |
|
|
hi,
no, all the archivelogs are available but not backed up by RMAN..I suppose they need to be backed up again after normal daily backup,if the restore is through RMAN?
can I get the steps/commands for restore and recovery of these new archivelogs which are now outside of RMAN flash recovery area?(After I do a normal restore until 4AM using RMAN and getting the error:RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 2010 and starting SCN of 27359579548
)
also, if RMAN is aware of the archive logs from 4am to 3pm, why does it say that the archived log is unknown?
[Updated on: Thu, 01 April 2010 08:19] Report message to a moderator
|
|
|
|
Re: RMAN full recovery of database using latest archivelogs [message #449915 is a reply to message #449854] |
Fri, 02 April 2010 04:10 |
Yasir Hashmi
Messages: 304 Registered: April 2006
|
Senior Member |
|
|
Because that archive log is missing.
During recovery RMAN would apply all the archivelogs from backups,archivelogs current and redo log files.
I corrupted my tablespace:
create table t ( n number) tablespace users;
create table t ( n number) tablespace users
*
ERROR at line 1:
ORA-01115: IO error reading block from file 4 (block # 161988)
ORA-01110: data file 4: '/u/oracle/oradata/treasury/users01.dbf'
ORA-27091: unable to queue I/O
ORA-27072: File I/O error
Additional information: 4
Additional information: 161987
Next i issue alter database archive log current to archive the redo log files containg information about recovery.
alter system archive log current;
System altered.
SQL> /
System altered.
SQL> /
System altered.
SQL> /
System altered.
In the RMAN prompt,
RMAN> list backup of archivelog from time 'sysdate-1';
using target database control file instead of recovery catalog
No archivelog backups are present.
RMAN> run
2> {restore datafile 4;
3> recover datafile 4;
4> }
Starting restore at 02-APR-10
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00004 to /u/oracle/oradata/treasury/users01.dbf
channel ORA_DISK_1: reading from backup piece /u1/flash_recovery_area/TREASURY/backupset/2010_03_30/o1_mf_nnndf_TAG20100330T184737_5v3yhkbc_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u1/flash_recovery_area/TREASURY/backupset/2010_03_30/o1_mf_nnndf_TAG20100330T184737_5v3yhkbc_.bkp tag=TAG20100330T184737
channel ORA_DISK_1: restore complete, elapsed time: 00:01:37
Finished restore at 02-APR-10
Starting recover at 02-APR-10
using channel ORA_DISK_1
starting media recovery
archive log thread 1 sequence 6 is already on disk as file /u1/flash_recovery_area/TREASURY/archivelog/2010_04_02/o1_mf_1_6_5vcbj7kv_.arc
archive log thread 1 sequence 7 is already on disk as file /u1/flash_recovery_area/TREASURY/archivelog/2010_04_02/o1_mf_1_7_5vcc3d5t_.arc
archive log thread 1 sequence 8 is already on disk as file /u1/flash_recovery_area/TREASURY/archivelog/2010_04_02/o1_mf_1_8_5vcc3q29_.arc
archive log thread 1 sequence 9 is already on disk as file /u1/flash_recovery_area/TREASURY/archivelog/2010_04_02/o1_mf_1_9_5vcc3xvt_.arc
archive log thread 1 sequence 10 is already on disk as file /u1/flash_recovery_area/TREASURY/archivelog/2010_04_02/o1_mf_1_10_5vcc4o9k_.arc
archive log filename=/u1/flash_recovery_area/TREASURY/archivelog/2010_04_02/o1_mf_1_6_5vcbj7kv_.arc thread=1 sequence=6
archive log filename=/u1/flash_recovery_area/TREASURY/archivelog/2010_04_02/o1_mf_1_7_5vcc3d5t_.arc thread=1 sequence=7
media recovery complete, elapsed time: 00:00:02
Finished recover at 02-APR-10
As all the archivelogs were available,RMAN did not complain.
|
|
|