Skip to content
Home » Oracle » How to Resolve RMAN-20242: specification does not match any archive log in the recovery catalog

How to Resolve RMAN-20242: specification does not match any archive log in the recovery catalog

Got an error RMAN-20242 when I tried to backup a specific range of online archived logs that have moved back from another temporary place. I thought it should work, because the control file has no way to know that I moved those archived logs back and forth.

RMAN-20242

RMAN> backup archivelog until sequence 25329 thread 1 delete input;
...
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20242: specification does not match any archive log in the recovery catalog.

In the first place, I thought there might be typos in specification of the above statement, which could cause RMAN-20242 if it matches nothing. But no typos, after I checked the statement again.

In my case, I tried to resync catalog with the catalog database and crosscheck archivelog all to make control file learn about their existence in the archived log destination. But these commands are all useless.

It seemed to make no sense, because I have never notified the control file to delete them from online archived log list of the recovery catalog. So next, I listed all the online archived logs that are still on the record of control file.

RMAN> list archivelog all;

List of Archived Log Copies
Key     Thrd Seq     S Low Time            Name
------- ---- ------- - ------------------- ----
3459527 1    25330   A 2016-09-21 22:59:29 /oracle/oradata/ORCL/ARCH/ORCL_1_25330.arc
3459576 1    25331   A 2016-09-21 23:34:22 /oracle/oradata/ORCL/ARCH/ORCL_1_25331.arc
...

Rationale

As we can see, the archived logs that I want to backup are out of the list. Which means that someone (one of my colleagues) notified the control file to delete them from online list. Perhaps he took a course of actions including crosscheck archivelog all and delete expired archivelog all subsequently.

As a result, RMAN can't find any archive log in the recovery catalog that I was trying to backup. I would say this error RMAN-20242 totally makes sense to me. Because the catalog is unable to recognize any of the specified archived logs that have already been deleted from online archived log list.

Do you know the differences between online archived logs and backup archived log? It's pretty important to learn these two before continuing reading this post.

If you lift the sequence range in the command, the specification will become widely open and match all known archived logs. It will be executed without errors. For example,

RMAN> backup archivelog all thread 1 delete input;

But this is not what I want. I want to backup the moved back archived log files.

Solutions

The only way that can get them back to the list in control file is to re-catalog them. In the following, I catalog 10 missing archived logs that are delimited by comma in one statement.

RMAN> catalog archivelog '/oracle/oradata/ORCL/ARCH/ORCL_1_25320.arc', ..., '/oracle/oradata/ORCL/ARCH/ORCL_1_25329.arc';

cataloged archive log
archive log filename=/oracle/oradata/ORCL/ARCH/ORCL_1_25320.arc ...

RMAN> list archivelog all;

List of Archived Log Copies
Key     Thrd Seq     S Low Time            Name
------- ---- ------- - ------------------- ----
3459373 1    25320   A 2016-09-21 09:32:01 /oracle/oradata/ORCL/ARCH/ORCL_1_25320.arc
...
3459527 1    25330   A 2016-09-21 22:59:29 /oracle/oradata/ORCL/ARCH/ORCL_1_25330.arc
3459576 1    25331   A 2016-09-21 23:34:22 /oracle/oradata/ORCL/ARCH/ORCL_1_25331.arc
...

Now we can backup them again. This time, the specification matches archived logs in the recovery catalog.

2 thoughts on “How to Resolve RMAN-20242: specification does not match any archive log in the recovery catalog”

Leave a Reply

Your email address will not be published. Required fields are marked *