Fading Coder

One Final Commit for the Last Sprint

Home > Tech > Content

Configuring Oracle Database Archivelog Mode and Parameters

Tech Dec 5 5

Oracle databases operate in either Noarchivelog or Archivelog mode. The Archivelog mode is essential for production environments as it enables point-in-time recovery. Running a database in this mode requires a robust backup strategy; otherwise, the accumulation of archived logs without proper management can lead to storage issues.

Verifying Current Log Mode

To determine the current archiving status, execute the following command within the SQL*Plus environment:

SQL> SELECT log_mode FROM v$database;

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

Alternatively, the ARCHIVE LOG LIST command provides detailed information regarding the automatic archival settings and destination.

Switching to Archivelog Mode

Transitioning to Archivelog mode requires a database restart. The instance must be mounted but not open during the modification.

-- 1. Terminate the session gracefully
SQL> SHUTDOWN IMMEDIATE;

-- 2. Start the instance in mount state
SQL> STARTUP MOUNT;

-- 3. Enable the archivelog feature
SQL> ALTER DATABASE ARCHIVELOG;

-- 4. Open the database for normal operations
SQL> ALTER DATABASE OPEN;

To revert to Noarchivelog mode, issue ALTER DATABASE NOARCHIVELOG while the database is in the MOUNT state.

Configuring Archival Parameters

In Oracle 10g and later releases, automated archiving is the default behavior. Historically, the LOG_ARCHIVE_START initialization parameter controlled this behavior, but it is now deprecated.

Modern configurations rely on the Fast Recovery Area (FRA) to store archived redo logs. The primary parameters defining the FRA are:

-- Check current FRA settings
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 10G

To allocate more space for archived logs, modify the size limit dynamically using the ALTER SYSTEM command:

SQL> ALTER SYSTEM SET db_recovery_file_dest_size = 20G SCOPE=BOTH;

Related Articles

Comprehensive Guide to SSTI Explained with Payload Bypass Techniques

Introduction Server-Side Template Injection (SSTI) is a vulnerability in web applications where user input is improper handled within the template engine and executed on the server. This exploit can r...

Implement Image Upload Functionality for Django Integrated TinyMCE Editor

Django’s Admin panel is highly user-friendly, and pairing it with TinyMCE, an effective rich text editor, simplifies content management significantly. Combining the two is particular useful for bloggi...

SBUS Signal Analysis and Communication Implementation Using STM32 with Fus Remote Controller

Overview In a recent project, I utilized the SBUS protocol with the Fus remote controller to control a vehicle's basic operations, including movement, lights, and mode switching. This article is aimed...

Leave a Comment

Anonymous

◎Feel free to join the discussion and share your thoughts.