Tuesday, December 8, 2009

How to backup archivelog in Dataguard environment

Usually the RMAN backup scripts (with Veritas NBU) for archivelog portion look like below:


# backup all archive logs
BACKUP
TAG pr_arc_bk
filesperset 50
FORMAT '"$NB_ORA_PC_SCHED"_arc_%d%Y%M%D_%s'
ARCHIVELOG ALL delete input;


But you will hit following errors if you have connected to RMAN CATALOG server, which connects to both Standby and Primary database.


Starting backup at 2009-DEC-02 11:05:34
current log archived
released channel: ch00
released channel: ch01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 12/02/2009 11:05:39
RMAN-06059: expected archived log not found, lost of archived log compromises recoverability
ORA-19625: error identifying file +ARCHDG/hkdrt/archivelog/2009_11_27/thread_1_seq_63.555.704024185
ORA-17503: ksfdopn:2 Failed to open file +ARCHDG/hkdrt/archivelog/2009_11_27/thread_1_seq_63.555.704024185
ORA-15012: ASM file '+ARCHDG/hkdrt/archivelog/2009_11_27/thread_1_seq_63.555.704024185' does not exist


The reason for the error is trying to backup standby archivelog at the primary site.

How to Resolve it?
Answer is matching the archivelog using "pattern".

For example:


# backup all archive logs
BACKUP
TAG pr_arc_bk
filesperset 50
FORMAT '"$NB_ORA_PC_SCHED"_arc_%d%Y%M%D_%s'
ARCHIVELOG LIKE '+ARCHDG/hktst%' delete input;

No comments:

Post a Comment