I have a very strange situation with the backup in a data guard environment:
(Oracle 12.1.0.2 with PSU 3 on RedHat Linux)
The following command fails while the command without a run block works:
rman target / catalog rman@rcvcat
run {
resync catalog from db_unique_name DG12C_S2;
delete archivelog all;
}
starting partial resync of recovery catalog
partial resync complete
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=788 device type=DISK
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/app/oracle/fra/DG12C_S2/archivelog/2015_07_06/o1_mf_1_551_bsnqhk3h_.arc thread=1 sequence=551
RMAN-08138: WARNING: archived log not deleted - must create more backups
archived log file name=/app/oracle/fra/DG12C_S2/archivelog/2015_07_06/o1_mf_1_552_bsnqhomo_.arc thread=1 sequence=552
RMAN-08138: WARNING: archived log not deleted - must create more backups
...
But without the run block it works:
RMAN> resync catalog from db_unique_name DG12C_S2;
RMAN> delete archivelog all;
starting partial resync of recovery catalog
partial resync complete
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=782 device type=DISK
RMAN-08120: WARNING: archived log not deleted, not yet applied by standby
archived log file name=/app/oracle/fra/DG12C_S2/archivelog/2015_07_28/o1_mf_1_662_bvgtmr7p_.arc thread=1 sequence=662
List of Archived Log Copies for database with db_unique_name DG12C_S2
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - ---------
25695307 1 551 A 05-JUL-15
Name: /app/oracle/fra/DG12C_S2/archivelog/2015_07_06/o1_mf_1_551_bsnqhk3h_.arc
25695309 1 552 A 06-JUL-15
Name: /app/oracle/fra/DG12C_S2/archivelog/2015_07_06/o1_mf_1_552_bsnqhomo_.arc
...
Any idea? Normally we are always using run blocks and never had issues.