Hi,
Sometimes You can get “RMAN-08137: WARNING: archived log not deleted as it is still needed ” error.
Details of error are as follows.
RMAN-08137: WARNING: archived log not deleted as it is still needed
Cause: An archived log that should have been deleted was not as it was required by Streams,
Data Guard or Guaranteed Restore Point. The next message identifies the archived log.
Action: This is an informational message. The archived log can be deleted after it is no longer needed.
See the documentation for Data Guard to alter the set of active Data Guard destinations.
See the documentation for Streams to alter the set of active streams. See the documentation for Guaranteed
restore point for set of active restore points.
This error is related with the obsolete Extract , To solve this error, you need to unregister the obsolete extract as follows.
As seen below obsolete EXTRACT1_NAME is showing REQ_SCN = 0.
SQL>SELECT CAPTURE_NAME, CAPTURE_TYPE, STATUS, to_char(REQUIRED_CHECKPOINT_SCN,'999999999999999')as REQ_SCN ,to_char(OLDEST_SCN,'999999999999999')as OLDEST_SCN FROM DBA_CAPTURE; CAPTURE_NAME CAPTURE_TYPE STATUS REQ_SCN OLDEST_SCN -------------- ------------ ------- -------- ---------- OGG$CAP_EXTRACT-NAME LOCAL ENABLED 64983227 64983227 OGG$CAP_EXTRACT1-NAME LOCAL ENABLED 0 0
Unregister the Extract as follows, then try to delete the old archive logs.
Firstly login database
DBLOGIN USERID GGS_ADMIN@MSDB, password AACAAAAAAAAAAAQANCGCECZECCODUGIGTAEIIFQEVJICWCIF, encryptkey default
then run the unregister command as follows.
UNREGISTER EXTRACT EXTRACT-NAME DATABASE
GGSCI (msdbadm02) 2> UNREGISTER EXTRACT EXMSD01 DATABASE
Do you want to learn more details about RMAN, then read the following articles.
https://ittutorial.org/rman-backup-restore-and-recovery-tutorials-for-beginners-in-the-oracle-database/