How to configure archiving of redo logs in Oracle

Redo logs are used to perform recovery or Point in time recovery. To save this redo log files we need to enable archiving. Below is the procedure for enabling the archiving.

1) Check whether the database in archivelog mode or not.

[oracle@node1 ~]$ sqlplus / as sysdba

SQL*Plus: Release Production on Tue Feb 16 10:20:36 2016

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release – 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options

SQL> select log_mode from  V$DATABASE;

NOARCHIVELOG ==> Database is in no archivelog mode.

2) Enable archiveing

To enable the archiveing in Oracle we need to set the location where to store the redo logfiles which are filled.  We can specify the location using the parameter “log_archive_dest_1”.

SQL> alter system set log_archive_dest_1=’LOCATION=+FRA1′ scope=spfile;

System altered.
After this shutdown the database and start the database in mount state.

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

SQL> startup mount
ORACLE instance started.

Total System Global Area  313159680 bytes
Fixed Size                  2212936 bytes
Variable Size             289409976 bytes
Database Buffers           16777216 bytes
Redo Buffers                4759552 bytes
Database mounted.

SQL>  alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> select log_mode from  V$DATABASE;

ARCHIVELOG ==> Archiving is enabled

SQL> archive log list
Database log mode              Archive Mode
Automatic archival             Enabled ==> Archivelog mode is enabled
Archive destination            +FRA1 ==> Location of archive logs

Oldest online log sequence     58
Next log sequence to archive   60
Current log sequence           60

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s