By Brian Fitzgerald
Introduction
After dropping a logical standby database, ORA-08137 appeared. Clearing log_archive_dest_2 resolved the issue.
Problem
During testing, I dropped a logical standby database. I attempted to delete archive logs on the primary. ORA-08137 appeared.
RMAN> delete noprompt archivelog all; using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=39 device type=DISK RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process archived log file name=+RECO01/EQTRD/ARCHIVELOG/2019_10_12/thread_1_seq_24.263.1021422689 thread=1 sequence=24
Solution
Having dropped the standby database, the appropriate solution is to clear log_archive_dest_2.
SQL> alter system set log_archive_dest_2 = ''; System altered.
Now the delete succeeds:
RMAN> delete noprompt archivelog all;
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=39 device type=DISK
List of Archived Log Copies for database with db_unique_name EQTRD
=====================================================================
Key Thrd Seq S Low Time
------- ---- ------- - ---------
33 1 24 A 11-OCT-19
Name: +RECO01/EQTRD/ARCHIVELOG/2019_10_12/thread_1_seq_24.263.1021422689
deleted archived log
archived log file name=+RECO01/EQTRD/ARCHIVELOG/2019_10_12/thread_1_seq_24.263.1021422689 RECID=33 STAMP=1021422689
Deleted 1 objects
No force is needed.
Conclusion
There are numerous causes for RMAN-08137 relating to GoldenGate and Streams. These situations are described in the blogs and forums. Also, other logical standby situations have a different solution. Our case here is simple. We dropped the logical standby. The solution is also simple: Clear log_archive_dest_2. Thanks to Dean Capps for describing this solution. Refer also to Note 2169282.1.
