← Back to list

Oracle Archivelog Mode

An archivelog in Oracle Database is a copy of one of the redo log files that has been filled and archived for backup and recovery purposes…

Foyez Ahmed Rony · 2024-06-06 06:37 · 2 claps · 1.5 min read
#oracle-database #oracle #archive-log #database-administration #database
Open on Medium ↗
Wiki topics: 💭 · Philosophy of Spirit

Oracle Archivelog Mode

An archivelog in Oracle Database is a copy of one of the redo log files that has been filled and archived for backup and recovery purposes. The process of archiving redo logs is part of Oracle’s strategy to ensure data integrity and enable recovery options.

Key Concepts of Archivelog Mode

Redo Log Files:

Redo log files record all changes made to the database. These are crucial for recovering the database to a consistent state in case of a failure.

  • The redo log files are cyclically reused, and without archiving, the data in the older redo log files would be lost.

2. Archivelog Mode:

  • When the database operates in archivelog mode, filled redo log files are archived before they can be reused.
  • This archiving process ensures that a copy of each filled redo log file is kept, which can be used for media recovery.
  1. Benefits of Archivelog Mode:
  • Point-in-Time Recovery: Allows recovery of the database to any point in time.
  • Media Recovery: Enables the restoration of the database to a consistent state after a media failure (e.g., disk crash).
  • Backup Operations: Facilitates online (hot) backups while the database is open and operational.
  1. Configuring Archivelog Mode:
  • Archivelog mode must be explicitly enabled. Once enabled, the Oracle database will automatically archive redo log files.
  • Archive destinations and formats can be specified to organize how and where the archived redo logs are stored.

Steps to Enable Archivelog Mode:

  1. Checking Archivelog Mode
SQL> archive log list;
SQL> SELECT LOG_MODE FROM SYS.V$DATABASE;

2. Set Archivelog Destination

SQL> ALTER SYSTEM SET LOG_ARCHIVE_FORMAT='arch_%t_%s_%r.dbf' SCOPE=SPFILE;
SQL> show parameter LOG_ARCHIVE_FORMAT;

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_format                   string      arch_%t_%s_%r.dbf

SQL> ALTER SYSTEM SET log_archive_dest_1='location=/u02/app/oracle/arch' SCOPE=both;
  • %t: Thread number
  • %s: Log sequence number
  • %r: Resetlogs ID
  1. Enable Archivelog Mode
SQL> shut immediate;
SQL> startup mount;
SQL> alter database archivelog;
SQL> alter database open;
SQL> archive log list;

References:

[embed]Flashback Database in Oracle Database 10g The FLASHBACK DATABASE command is a fast alternative to performing an incomplete recovery, also known as a…oracle-base.com

[embed]How to enable flash recovery area in oracle database The flash recovery area(FRA) is an Oracle-managed destination( either FILE SYSTEM or ASM ) for centralized backup and…dbaclass.com

[embed]Oracle Archivelog Mode Oracle Database lets you save filled groups of redo log files to one or more offline destinations, known collectively…support.dbagenesis.com


메타데이터
post_id
1a91ecd78cbc
slug
oracle-archivelog-mode-1a91ecd78cbc
url
https://medium.com/@far.rony/oracle-archivelog-mode-1a91ecd78cbc
canonical_url
https://medium.com/@far.rony/oracle-archivelog-mode-1a91ecd78cbc
author_url
https://medium.com/@far.rony
status
ok
fetched_at
2026-08-15 18:52:26