RMAN backup not backing up archivelog after database backup [message #439000] |
Wed, 13 January 2010 09:49 |
chetanaZ
Messages: 132 Registered: October 2009 Location: UK
|
Senior Member |
|
|
Hi,
I have 2 queries regarding rman backup and recovery
Please see a test case below after which have mentioned my queries :
After database Creation
are no archivelogs files at log_archive_dest=e:\archive
conn a/a conn sys / as sysdba Result
14:27 create table t(n number, alter system archivelog current; ARC00003.001
tm timestamp)
insert into t values(1,systimestamp);
commit;
14:29 insert into t values(2,systimestamp); alter system archivelog current; ARC00004.001
commit;
14:32 insert into t values(3,systimestamp);
commit;
run{
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to 'e:\backup\db03ctl%F';
configure channel 1 device type disk format 'e:\backup\%d_%T_%s_%p.bak';
configure retention policy to redundancy 1;
backup database plus archivelog;
delete obsolete;
}
This command created ARC00005.001 backed it up and after backup created ARC00006.001 at log_archive_dest
This backup completed before 14:33
14:34 insert into t values(4,systimestamp); alter system archivelog current; ARC00007.001
commit;
14:36 insert into t values(5,systimestamp); alter system archivelog current; ARC00008.001
commit;
14:38 insert into t values(6,systimestamp); alter system archivelog current; ARC00009.001
commit;
Questions
1) before backup there were 2 archivelog files
ARC00003.001, ARC00004.001
The 'backup database plus archivelog' switched redo created 'ARC00005.001' backed it up
backedup the database
again switched redo and created 'ARC00006.001'
however it did not backed up 'ARC00006.001' contrary to the dcoumentation : extract below
When you specify PLUS ARCHIVELOG, RMAN performs these steps:
1. Runs an ALTER SYSTEM ARCHIVE LOG CURRENT statement.
2. Runs the BACKUP ARCHIVELOG ALL command. Note that if backup optimization is enabled, then RMAN only backs up logs that have not yet been backed up.
3. Backs up the files specified in the BACKUP command.
4. Runs an ALTER SYSTEM ARCHIVE LOG CURRENT statement.
5. Backs up any remaining archived redo logs.
2) at 14:38:XX, after inserrting n=6 in table t, current redo was archived to create 'ARC00009.001' however while recovering
at 14:38:XX, the database expects 'ARC00010.001', What could be the reason? please see recovery session below
In fact immediately after archiving 'ARC00010.001' I shut down the database.
SQL> RECOVER automatic DATABASE until time '2010-01-13:14:38:10' USING BACKUP CONTROLFILE;
ORA-00279: change 47057 generated at 01/13/2010 14:38:19 needed for thread 1
ORA-00289: suggestion : E:\ARCHIVE\ARC00010.001
ORA-00280: change 47057 for thread 1 is in sequence #10
ORA-00278: log file 'E:\ARCHIVE\ARC00010.001' no longer needed for this
recovery
ORA-00308: cannot open archived log 'E:\ARCHIVE\ARC00010.001'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
cancel
Media recovery cancelled.
SQL> RECOVER automatic DATABASE until time '2010-01-13:14:38:05' USING BACKUP CONTROLFILE;
ORA-00279: change 47057 generated at 01/13/2010 14:38:19 needed for thread 1
ORA-00289: suggestion : E:\ARCHIVE\ARC00010.001
ORA-00280: change 47057 for thread 1 is in sequence #10
ORA-00278: log file 'E:\ARCHIVE\ARC00010.001' no longer needed for this
recovery
ORA-00308: cannot open archived log 'E:\ARCHIVE\ARC00010.001'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
C:\Documents and Settings\oradba.DEV>E:\oracle\ora9201\bin\rman target /
Recovery Manager: Release 9.2.0.6.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database: DB03 (DBID=1416954423)
RMAN> recover database;
Starting recover at 13-JAN-10
using target database controlfile instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=14 devtype=DISK
starting media recovery
unable to find archive log
archive log thread=1 sequence=10
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 01/13/2010 14:57:20
RMAN-06054: media recovery requesting unknown log: thread 1 scn 47057
RMAN> exit
Thanks and Regards,
Chetana
|
|
|
|
Re: RMAN backup not backing up archivelog after database backup [message #439280 is a reply to message #439000] |
Fri, 15 January 2010 09:14 |
chetanaZ
Messages: 132 Registered: October 2009 Location: UK
|
Senior Member |
|
|
Hi Ebrian,
sorry for the delayed reply
For your reply on question 1, I checked timing of archivelog file when it was created. I will check it from v$archived_log and will post the results/conculsion
For your reply to Question 2, it is true what you are saying but not sure why?
In my case I missed the 'second' details probably.
Meaning it seems I should have checked archivelog creation time till second details to do PITR e.g. 14:38:07 etc
However, can i perform following 2 options
1)
RECOVER automatic DATABASE until time '2010-01-13:14:38:10' USING BACKUP CONTROLFILE;
alter database open read only;
--- confirm till what time database is recovered
---if not satisfied recover till further later point of time
RECOVER automatic DATABASE until time '2010-01-13:14:39:40' USING BACKUP CONTROLFILE;
2)
RECOVER automatic DATABASE until time '2010-01-13:14:38:10' USING BACKUP CONTROLFILE;
--if it fails since required archivelogs are not there
-- try another timestamp prior to above
RECOVER automatic DATABASE until time '2010-01-13:14:34:10' USING BACKUP CONTROLFILE;
Thanks and REgards,
Chetana
|
|
|
|
|