🧩 How to Enable and Disable Archive Log Mode in Oracle Database


🧩 Introduction

Archive log mode is critical for database recovery and Data Guard configurations. When enabled, Oracle saves filled redo log files as archive logs, which can be used for point-in-time recovery. As a DBA, you may need to enable or disable archive log mode depending on requirements.


Step 1: Check Current Archive Log Mode


ARCHIVE LOG LIST;


➡️ This command shows whether the database is in ARCHIVELOG or NOARCHIVELOG mode.


Step 2: Enable Archive Log Mode


1. Shut down the database:


SHUTDOWN IMMEDIATE;


2. Start the database in mount mode:


STARTUP MOUNT;


3. Enable archive log mode:


ALTER DATABASE ARCHIVELOG;


4. Open the database:


ALTER DATABASE OPEN;


➡️ The database is now running in ARCHIVELOG mode.


Step 3: Disable Archive Log Mode


1. Shut down the database:


SHUTDOWN IMMEDIATE;


2. Start the database in mount mode:


STARTUP MOUNT;


3. Disable archive log mode:


ALTER DATABASE NOARCHIVELOG;


4. Open the database:


ALTER DATABASE OPEN;


➡️ The database is now running in NOARCHIVELOG mode.


Conclusion

Enabling archive log mode ensures recoverability and is essential for production systems, while disabling it may be acceptable for test or development environments. Always plan carefully before switching modes.

Comments