Oracle Database Enable Archivelog Mode

In this article I will tell you about the Oracle database enable Archive mode and what happens when it is enabled.

archive

If the Oracle database is first installed, it is in NoArchivelog mode by default if you have not changed it. Oracle are not archived Online Redo log files if database is in NoArchivelog mode. So online redolog files are overwritten when they are full.
If Oracle database is restarted or crashed suddenly, then it cannot start consistently without old Redo log records.

On the other hand, oracle database must be in Archivelog mode so that we can take Full backup in online mode. If Oracle database that is in NoArchivelog mode, RMAN cannot receive Online Backup.

 

 

The databases in the production environment must be in Archivelog mode and generally they are in Archivelog mode. You can check following query if it is in archivelog or not.

 

[oracle@MehmetSalih ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Tue Mar 19 17:19:13 2019

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

Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select log_mode from v$database;

LOG_MODE
------------
NOARCHIVELOG

SQL>

 

A database that is not in Archivelog mode is taken into Archivelog mode with the following steps.

 

Firstly, the database is closed consistently.

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

Secondly. After the database is closed consistently, the database opens in mount mode.

SQL> startup mount
ORACLE instance started.

Total System Global Area  534462464 bytes
Fixed Size                  2230072 bytes
Variable Size             339740872 bytes
Database Buffers          184549376 bytes
Redo Buffers                7942144 bytes
Database mounted.
SQL>

 

3. The database in the Mount mode is make it into the archive mode as follows.

SQL> alter database archivelog;
Database altered.

 

4. After the database is in archive mode, the Database is opened as follows.

SQL> alter database open;
Database altered.

 

5. If we do not specify the location of the archives, it is stored default location of db_recovery_file_dest firstly. The first location where the database archives stores is the location of the log_archive_dest_1 parameter. We can adjust this value as follows.

 

SQL> alter system set log_archive_dest_1='location=/oracle/oradata/ARCH';

System altered.

 

 

Mehmet Salih Deveci

I am Founder of IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience. I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource. I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks. I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients. If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress mehmetsalih.deveci@outlook.com. -                                                                                                                                                                                                                                                 - Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  mehmetsalih.deveci@outlook.com a mail atabilirsiniz.

2 thoughts on “Oracle Database Enable Archivelog Mode