RMAN-08137: WARNING: archived log not deleted, needed for standby is a warning (not an error) from RMAN during a log deletion operation. It means that RMAN did not delete an archived redo log file because it is still required by a standby database (e.g., Data Guard standby or downstream database).
Why It Happens
This is by design — to prevent RMAN from deleting logs that are not yet applied or shipped to all configured standby databases.
What You Should Check
1. RMAN Deletion Policy
Check your current policy in RMAN:
SHOW ALL;
Look for something like:
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON STANDBY;
Or
CONFIGURE ARCHIVELOG DELETION POLICY TO SHIPPED TO STANDBY;
2. Status of Logs on the Standby
On the standby database, check which logs are applied:
SELECT SEQUENCE#, APPLIED FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
Also check for gaps:
SELECT * FROM V$ARCHIVE_GAP;
3.Transport and Apply Services
Make sure redo is being shipped and applied:
-- On Primary
SELECT DEST_ID, STATUS, ERROR FROM V$ARCHIVE_DEST;
-- On Standby
SELECT PROCESS, STATUS, THREAD#, SEQUENCE# FROM V$MANAGED_STANDBY;
How to Fix or Silence the Warning (if logs are really no longer needed)
If you’re certain the standby no longer needs those logs (e.g., it has been decommissioned or recreated), you can temporarily override the deletion policy:
-- In RMAN
DELETE ARCHIVELOG ALL;
Or force deletion:
DELETE NOPROMPT ARCHIVELOG ALL;
Caution: Only do this if you’re absolutely sure the logs are no longer needed by any standby database.
Best Practice
CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;
This ensures logs are only deleted after being safely applied to all standby databases.