Re: rman archivelog delete - Dataguard
- From: Steve Perry <sperry@xxxxxxxxxxx>
- To: dd.yakkali@xxxxxxxxx
- Date: Wed, 1 Nov 2006 17:53:32 -0600
you probably already got your answer, but I'll add my 2 cents.
if you run backup archivelog all... delete input;
rman won't delete the archive logs that haven't been applied to the
standby. you should receive the following error:
RMAN-08137: WARNING: archive log not deleted as it is still needed
if you have a run block and have a separate delete statement
i.e. delete archive until time...;
it will delete them even if they haven't been applied.
we want to keep 24 hours of arch logs on disk and came up with the
following ideas with pros and cons.
they are just thoughts now, but I'm open to suggestions.
1.) use this run block or something similar
run {
BACKUP ARCHIVELOG ALL not backed up 1 times; #or 2 times.
DELETE ARCHIVELOG ALL COMPLETED BEFORE 'TRUNC(SYSDATE-1)';
}
pros: kind of does what we want. if the backup fails the delete
command won't be executed. if it's a separate command, it will
execute regardless of the previous command.
cons: if the standby is down for more than 24 hours, the logs will be
deleted and have to be restored from tape to sync it up.
2.) use
backup archivelog all until time "trunc(systdate-1)" not backed up 1
times delete input;
pros: only backups the logs once and deletes them. won't delete them
if the standby crashes. you get the error above.
cons: this will always have 24 hours of logs on the disk that have
not been backed up.
3.) backup the standby database instead of the primary.
pros: doesn't impact production, doesn't have to worry about the
delete problem because they would have to be applied to the standby
first.
cons: diligent about monitoring the standby to keep it in sync. if
the standby is in a remote site, getting the logs to the primary
might be an issue.
On Oct 27, 2006, at 10:42 PM, dd yakkali wrote:
Hello RMAN gurus,
I have 2 questions regarding deleting archivelogs in a dataguard
environment. I use RMAN to backup my archivelogs to SBT.
physical standby, 10.1.0.3 on solaris 9
1) Using RMAN, how do we make sure archive log is applied on the
standby before deleting it on primary. I know i can write a script
outside of RMAN to check v$archived_log and look for applied column
before deleting.
2) Can we combine multiple conditions while deleting archivelogs
using RMAN.
Eg:
delete noprompt archivelog all completed before 'sysdate-2' backed
up 2 times to device type SBT;
In the above command I am combining 2 conditions a) completed
before sysdate-2 b) backed up 2 times to device type SBT ( I do not
know whether it is legal to do so or not )
above command does run without syntax errors, but does not do its job.
Can anybody give me some way of accomplishing these.
Thanks in advance
Deen
- Follow-Ups:
- RE: rman archivelog delete - Dataguard
- From: Laimutis Nedzinskas
Other related posts:
- » rman archivelog delete - Dataguard
- » Re: rman archivelog delete - Dataguard
- » Re: rman archivelog delete - Dataguard
- » RE: rman archivelog delete - Dataguard
- » Re: rman archivelog delete - Dataguard
Hello RMAN gurus,I have 2 questions regarding deleting archivelogs in a dataguard environment. I use RMAN to backup my archivelogs to SBT.
physical standby, 10.1.0.3 on solaris 91) Using RMAN, how do we make sure archive log is applied on the standby before deleting it on primary. I know i can write a script outside of RMAN to check v$archived_log and look for applied column before deleting.
2) Can we combine multiple conditions while deleting archivelogs using RMAN.
Eg:delete noprompt archivelog all completed before 'sysdate-2' backed up 2 times to device type SBT;
In the above command I am combining 2 conditions a) completed before sysdate-2 b) backed up 2 times to device type SBT ( I do not know whether it is legal to do so or not )
above command does run without syntax errors, but does not do its job. Can anybody give me some way of accomplishing these. Thanks in advance Deen
- RE: rman archivelog delete - Dataguard
- From: Laimutis Nedzinskas