How to Enable and Check Archive Log Mode in Oracle


 Introduction

Archivelog mode is essential for database recovery and backups. Without it, you cannot perform point-in-time recovery. In this post, we’ll see how to check if it’s enabled and how to turn it on.



---


Step 1: Check Current Archive Log Mode


Connect as SYSDBA:


sqlplus / as sysdba


Run:


ARCHIVE LOG LIST;


You will see whether the database is in ARCHIVELOG or NOARCHIVELOG mode.



---


Step 2: Switch to Archivelog Mode


If your database is in NOARCHIVELOG mode:


1. Shutdown database:




SHUTDOWN IMMEDIATE;


2. Start in mount mode:




STARTUP MOUNT;


3. Enable archivelog:




ALTER DATABASE ARCHIVELOG;


4. Open database:




ALTER DATABASE OPEN;



---


Step 3: Verify Archivelog is Enabled


ARCHIVE LOG LIST;


You should now see Database log mode: Archive Mode.



---


Step 4: Optional – Enable Automatic Archiving


ALTER SYSTEM SET log_archive_dest_1='LOCATION=/u01/app/oracle/archive' SCOPE=SPFILE;


Restart the database to apply changes.



---


Conclusion

Enabling Archivelog mode is critical for production databases. Always ensure enough space is available for archived logs, and regularly back them up to prevent disk space issues.



---

Comments