Enable-Disable Archivelog Mode in Oracle Database:

Here we will learn how to enable-disable archivelog mode in Oracle database. But why do we enable-disable archivelog mode in oracle database and why it is important? First of all, lets go through this:


Importance of Archivelog mode in Oracle Database :

  • If we don’t enable the archivelog mode, we can’t recover the database to the latest point in time if required.
  • One more thing is that in noarchivelog mode, if we want to take the backup we need to shut down the database. So in real scenarios or in the corporate sectors, for the production databases, we can’t get the downtime frequently. So enabling archivelog mode is important.

Enable ARCHIVELOG Mode :

To change the archivelog mode, database has to be in mount mode. So we need to shut down the database

  1. Check the current log mode and the role of the database.

SQL> select log_mode from v$database;

SQL> select name,open_mode from v$database;

Enable-Disable Archivelog Mode in Oracle Database:

2. We are assuming that databadse is running with spfile. Check that and shutdown the database.

SQL> shutdown immediate;
SQL> exit;

Enable-Disable Archivelog Mode in Oracle Database:

3. Now start the database in mount mode and put it in archivelog mode and open the database.

sqlplus “/as sysdba”

SQL> startup mount;

SQL>alter database archivelog;

SQL> alter database open;

enable-disable archivelog mode in oracle database

4. Now check the log_mode of the database

SQL>select log_mode from v$database;

Enable-Disable Archivelog Mode in Oracle Database:

5. Now check the current log sequence

SQL> archive log list;
6. Do a couple of switch logfile and check if the archivelog sequence no. is increasing
SQL> alter system switch logfile;

Enable-Disable Archivelog Mode in Oracle Database:

Disable ARCHIVELOG Mode :

  1. Check the current log mode and the role of the database.

SQL> select log_mode from v$database;
SQL> select name,open_mode from v$database;

Enable-Disable Archivelog Mode in Oracle Database:

2. Check the spfile value and shutdown the database (We are assuming here the database is running with spfile)

SQL> shutdown immediate;

Enable-Disable Archivelog Mode in Oracle Database:

3. Now startup the database in mount mode and put it in noarchivelog mode and open the database.

sqlplus “/as sysdba”

SQL> startup mount;

SQL>alter database noarchivelog;

SQL> alter database open;

SQL> select log_mode from v$database;

enable-disable archivelog mode in oracle database

4. Now check the log_mode of the database

SQL>select log_mode from v$database;

Enable-Disable Archivelog Mode in Oracle Database:

So here are the steps to enable-disable archivelog mode in oracle database. Hope that helps!!

Leave a Reply