🧩 How to Monitor Archive Log Space Usage in Oracle Database


🧩 Introduction

In Oracle databases running in ARCHIVELOG mode, archive logs can quickly consume disk space if not managed properly. Monitoring archive log space is critical to prevent database downtime.


Step 1: Check Archive Log Destination


SHOW PARAMETER log_archive_dest;


➡️ Displays the path where archive logs are stored.


Step 2: Check Space Usage with OS Commands


du -sh /u01/app/oracle/archivelog/


➡️ Shows total size of archive logs in the archive destination.


Step 3: List Archive Logs in Database


SELECT sequence#, applied, completion_time

FROM v$archived_log

ORDER BY completion_time DESC;


➡️ Lists archive logs with their status and completion time.


Step 4: Delete Old Archive Logs


If using RMAN:


DELETE ARCHIVELOG UNTIL TIME 'SYSDATE-7';


➡️ Removes archive logs older than 7 days.


Conclusion

Monitoring and cleaning up archive logs prevents space issues and ensures smooth Oracle database operation.



---

Comments