ENABLE And DISABLE Archive Log In Oracle

Enable Archive Log Mode

 Step 1st: Check if database is running in Archive log mode or not

SQL> archive log list

Database log mode         No Archive Mode

Automatic archival                Disabled

Archive destination        USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     52

Current log sequence                 54

Step 2nd: Validate db recovery destination is set or not to store archive logs.

SQL> show parameter db_recovery_file_dest

NAME                                                    |TYPE         |VALUE

------------------------------------|-----------|------------------------------

db_recovery_file_dest             |string            |/u01/app/oracle/fast_recovery_area

db_recovery_file_dest_size    |big integer|12732M

Step 3rd: Enable blackout for the database to prevent unnecessary alerts

Step 4th: Bring down the database and start it in mount mode

NOTE: In Case of RAC start only one instance, from 19c onward we don’t need to set    

               cluster_database parameter as false prior to set any cluster wide parameter.

 

SQL> shut immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount

ORACLE instance started.

Total System Global Area|1728050736|bytes

Fixed Size                  |   9135664|bytes

Variable Size             | 536870912|bytes

Database Buffers     |1174405120|bytes

Redo Buffers             |   7639040|bytes

Database mounted.

Step 5th: Enable Archive log mode & bring up the database

SQL> alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

NOTE: If Database is a RAC database, then bring up second instance as well.

Step 6th: Validate if database is running in archive log mode

SQL> archive log list

Database log mode          Archive Mode

Automatic archival         Enabled

Archive destination        USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     53

Next log sequence to archive   55

Current log sequence            55

Step 7th: Remove Blackout for the database


Disable Archive Log Mode

Step 1st: Check if database is running in Archive log mode or not

SQL> archive log list

Database log mode          Archive Mode

Automatic archival         Enabled

Archive destination        USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     51

Next log sequence to archive   53

Current log sequence            53

Step 2nd: Enable blackout for the database to prevent unnecessary alerts

Step 3rd: Bring down the database and start it in mount mode

NOTE: In Case of RAC start only one instance , from 19c onward we don’t need to set cluster_database parameter as false

 

SQL> shut immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup mount

ORACLE instance started.

Total System Global Area 1728050736 bytes

Fixed Size                      9135664 bytes

Variable Size               536870912 bytes

Database Buffers     1174405120 bytes

Redo Buffers                 7639040 bytes

Database mounted.

Step 4th: Disable Archive log mode & bring up the database

SQL> alter database noarchivelog;

Database altered.

SQL> archive log list

Database log mode          No Archive Mode

Automatic archival         Disabled

Archive destination        USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     51

Current log sequence            53

Step 5th: Validate if database is running in No archive log mode

SQL> archive log list

Database log mode          No Archive Mode

Automatic archival         Disabled

Archive destination        USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence     52

Current log sequence            54

Step 6th: Remove Blackout for the database


Post a Comment

Previous Post Next Post