ORA-01153
Got an error ORA-01153 like this:
SQL> recover standby database until cancel;
ORA-01153: an incompatible media recovery is active
Let's see the content of ORA-01153
Description
ORA-01153: an incompatible media recovery is active
Cause
Attempted to start an incompatible media recovery or open resetlogs during media recovery or RMAN backup . Media recovery sessions are incompatible if they attempt to recover the same data file. Incomplete media recovery or open resetlogs is incompatible with any media recovery. Backup or restore by RMAN is incompatible with open resetlogs
Action
Complete or cancel the other media recovery session or RMAN backup
First of all, you should to stop any recovery process that you had ever initiated it before doing other recovery.
SQL> alter database recover managed standby database cancel;
A Reported Bug
Chances are, Managed Recovery Process (MRP) could have never been started. See my case below:
SQL> alter database recover managed standby database cancel;
alter database recover managed standby database cancel
*
ERROR at line 1:
ORA-16136: Managed Standby Recovery not active
SQL> select process,client_process,thread#,sequence#,block# from v$managed_standby where process = 'MRP0' or client_process='LGWR';
no rows selected
But I did have a RMAN script running for restoring archived logs from media (tapes) while I was trying to activate MRP, but it's irrelevant to the above recover database. So I guess Oracle does not allow this manner of parallel restore/recovery operations which might result in a conflicting or exclusive outcome.
This could be the bug which was reported several years ago. You can either to patch the database or work around ORA-01153 by the following arrangement to reconcile each other.
Workaround
If you want to run RMAN scripts and recover database at the same time. You should activate recover database first, then run other media recovery by RMAN scripts.
Which means, if you are running other media recovery by RMAN scripts right now, you have to interrupt it and re-run the RMAN scripts right after recover database is actually activated. There would be compatible and no ORA-01153 generated.
See also: How to Resolve ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below