RMAN RAC Archivelog Restore Fails with RMAN-20242 (Doc ID 180169.1)

rongshiyuan發表於2014-05-22

RMAN RAC Archivelog Restore Fails with RMAN-20242 (Doc ID 180169.1)


***Checked for relevance on 29-Nov-2013***
 Problem Description
-------------------

This is a two nodes RAC environment. There is no problem to backup the database or 
archivelogs for both threads. There is an issue  to restore archivelogs 
for thread 2 while being able to restore for thread 1.

The following are the backup and restore scripts, and error messages.

run
 {
allocate channel t1 type 'sbt_tape' connect internal/oracle@prod1 parms 'ENV=(DSMO_NODE=cc1)';
allocate channel t2 type 'sbt_tape' connect internal/oracle@prod2 parms 'ENV=(DSMO_NODE=cc2)';
backup
          (archivelog
           from logseq 41700 until logseq 41702
           thread 1
           channel t1);
backup
          (archivelog
           from logseg 14007 until logseq 14008
           thread 2
           channel t2);
release channel t1;
release channel t2;
 }

The backup is fine.

run {
 allocate channel t1 type 'sbt_tape' connect 'internal/oracle@prod1';
 allocate channel t2 type 'sbt_tape' connect 'internal/oracle@prod2';
 set autolocate on;
 restore (archivelog from logseq 14193 until logseq 14194 ) ; 
 restore (archivelog from logseq 42255 until logseq 42257 ) ;
 release channel t1;
 release channel t2;
 }

'SET AUTOLOCATE ON' to let rman automatically detect the archivelog destination for each node.

RMAN-03025: performing implicit partial resync of recovery catalog
RMAN-03023: executing command: partial resync
RMAN-08003: starting partial resync of recovery catalog
RMAN-08005: partial resync complete
RMAN-06050: archivelog thread 1 sequence 41700 is already on disk as file 
/u02/oracle/admin/prod/arch/prod1/redo1_41700.arc
RMAN-06050: archivelog thread 1 sequence 41701 is already on disk as file 
/u02/oracle/admin/prod/arch/prod1/redo1_41701.arc
RMAN-06050: archivelog thread 1 sequence 41702 is already on disk as file 
/u02/oracle/admin/prod/arch/prod1/redo1_41702.arc
RMAN-06177: restore not done; all files readonly, offline, or already restored
RMAN-03026: error recovery releasing channel resources
RMAN-08031: released channel: t1
RMAN-08031: released channel: t2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure during compilation of command
RMAN-03013: command type: restore
RMAN-03002: failure during compilation of command
RMAN-03013: command type: IRESTORE
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20242: 
specification does not match any archivelog in the recovery catalog

Noticed that the archivelogs for thread 1 had been restored but failed to restore
archivelogs for thread 2.

You have one archivelog destination for each thread and they are local to each node.

* You tried to run the above script from both nodes and it didn't make a difference
* You tried not to use autolocate and defined thread # for each channel, and it 
didn't make a difference. For example,

RMAN> run
2> {
3> allocate channel t1 type 'sbt_tape' connect internal/oracle@prod1;
4> allocate channel t2 type 'sbt_tape' connect internal/oracle@prod2;
5> set archivelog destination to '/temp01/rman' ;
6> restore (archivelog from logseq 14007 until logseq 14008 thread 2 channel t2);
7> restore (archivelog from logseq 41700 until logseq 41702 thread 1 channel t1);
8> release channel t1;
9> release channel t2;
10> }


OERR:  RMAN 20242  specification does not match any archivelog in the recovery catalog
Error: RMAN 20242
Text:  specification does not match any archivelog in the recovery catalog 
---------------------------------------------------------------------------
Cause:	
Action:	check the archivelog specifier

* You checked the archivelog backup pieces are on both tape and catalog.

Solution Description
--------------------

Use like clause for restore in RAC environment.

i.e.
RMAN> restore archivelog like '/full path/archivelog_name';

Explanation
-----------

like 'string_pattern'
specifies a pathname for archived redo log files. Use this parameter when operating in OPS
mode to specify which file system RMAN should access. For example, if nodes A, B, and C
each archives locally, use the like parameter to inform the channel allocated on each node to
back up only those logs that contain the specified pathname.

References
----------

* Recovery Manager user's guide. 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/17252115/viewspace-1167429/,如需轉載,請註明出處,否則將追究法律責任。

相關文章