DBA Corner

Data is stored somewhere

Oracle: Enable or Disable ARCHIVELOG Mode

ARCHIVELOG mode is required for online backups and point-in-time recovery. Changing the mode requires the database to be mounted but not open, so plan an outage and confirm that recent backups are recoverable.

Before the change

  • Verify the current mode with SELECT log_mode FROM v$database;.
  • Confirm the archive destination has enough capacity and is monitored.
  • Review the backup, retention, deletion, Data Guard, and recovery-area policies.
  • For Oracle RAC or a managed service, follow the platform-specific procedure.

Enable ARCHIVELOG mode

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;

ARCHIVE LOG LIST;
SELECT log_mode FROM v$database;

After enabling the mode, take a new whole-database backup. A backup made before the change is not a substitute for establishing the new recovery chain.

Archive destination

Current systems commonly use the fast recovery area or one or more LOG_ARCHIVE_DEST_n destinations. Configure and validate those settings for the installed Oracle release before enabling the mode. Monitor destination status, free space, and archive gaps; a full destination can stop database progress.

Disable ARCHIVELOG mode

SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
ALTER DATABASE NOARCHIVELOG;
ALTER DATABASE OPEN;

ARCHIVE LOG LIST;
SELECT log_mode FROM v$database;

Warning: disabling ARCHIVELOG mode removes the ability to perform media recovery using archived redo and normally breaks point-in-time recovery and Data Guard requirements. Do it only when the recovery policy explicitly permits the loss, and take a new consistent backup afterward.

Operational validation

  • Force a log switch during a controlled test and verify that an archive is created.
  • Run the backup job and confirm that its archive-log handling succeeds.
  • Test restore and recovery in a separate environment.
  • Alert on destination errors, space exhaustion, and unusual archive generation rates.

The former init.ora example used obsolete automatic-archiving parameters. This version uses the supported database mode commands and leaves destination design to the current release and recovery policy.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *