How to enable or disable archive log in ORACLE



Here I'm going to show how to enable or disable archive log in oracle.

before Start first check our database is in archive log mode or not

so let's see

 1. to check the archive log list execute below command on terminal

       

SQL> archive log list;
Database log mode        Archive Mode
Automatic archival        Enabled
Archive destination        /u01/arc/
Oldest online log sequence     145
Next log sequence to archive   147
Current log sequence        147


We can see that our database is in archive log mode which automatic archival is enabled.

2. we are going to disble it

first down the database with following command

       

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.


make sure database must down with immediate command only otherwise it won't work

3. Now Start the Database in mount mode

       

SQL> startup mount
ORACLE instance started.
Total System Global Area  622149632 bytes
Fixed Size      2215904 bytes
Variable Size    369098784 bytes
Database Buffers   247463936 bytes
Redo Buffers      3371008 bytes
Database mounted.


4. lets once again check the startus of archive log by same command

       

SQL> archive log list 
Database log mode        Archive Mode
Automatic archival        Enabled
Archive destination        /u01/arc/
Oldest online log sequence     145
Next log sequence to archive   147
Current log sequence        147
SQL>
SQL>


5. now disable the archivelog  by below command
       

SQL> alter database noarchivelog;
Database altered.


6. Now check the Status

       

SQL> archive log list;
Database log mode        No Archive Mode
Automatic archival        Disabled
Archive destination        /u01/arc/
Oldest online log sequence     145
Current log sequence        147


7. Here We can see that database is in no archive log mode
in this command you can also see the whole path of archive log

Comments