Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Don't Delete archivelogs from Standby Until Cascaded

user11961055Mar 18 2010 — edited Mar 18 2010
10.2.0.2 on AIX.

PROD uses STDBY1 as its standby, and SDTBY1 then cascades the applied archivelogs to STDBY2. On STDBY1 I periodically backup and delete applied archivelogs:

#!/bin/ksh
sqlplus <<EOF
/ as sysdba
spool /tmp/applied_logseq.txt
select 'XXX ' || max (sequence#)
from v\$archived_log
where applied = 'YES';
spool off
exit
EOF
max_logseq=$(grep ^XXX /tmp/applied_logseq.txt |awk '{print $2}')
rman <<EOF
connect target
delete noprompt archivelog until logseq $max_logseq;
exit
EOF
exit

This worked when the environment was just PROD and STDBY1. Now it seems that my archivelog cleanup script on STDBY1 is sometimes deleting archivelogs before they get cascaded to STDBY2. How do I make sure I don't delete the STDBY1 archivelogs too soon?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 15 2010
Added on Mar 18 2010
2 comments
1,469 views