How to configure archiving of redo logs in Oracle
1) Check whether the database in archivelog mode or not.
[oracle@node1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 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 11.2.0.1.0 – 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
SQL> select log_mode from V$DATABASE;
LOG_MODE
————
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;
LOG_MODE
————
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