LLI Wiki — My Digital Knowledge Base

Enable and disable archivelog mode in Oracle

Check, enable and disable archivelog mode on an Oracle database, with the SQL*Plus commands.

Archivelog mode keeps a copy of each filled online redo log. It makes online backups and point-in-time recovery possible. This article shows how to check, enable and disable it.

Check the current mode

sys@ORCL> archive log list;

Example output in noarchivelog mode:

Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            d:\oradata\archive
Oldest online log sequence     35
Current log sequence           37

Enable archivelog mode

  1. Shut the database down:

    shutdown immediate;
    
  2. Start the instance in mount mode:

    startup mount;
    
  3. Enable archivelog mode:

    alter database archivelog;
    
  4. Open the database:

    alter database open;
    
  5. Verify:

    archive log list;
    

    Database log mode shows Archive Mode and Automatic archival shows Enabled.

Disable archivelog mode

shutdown immediate;
startup mount;
alter database noarchivelog;
alter database open;

Verify the mode from the data dictionary

select log_mode from v$database;

Result on a database in archivelog mode: ARCHIVELOG.

Notes

Mastodon LLIMastodon SocialFosstodon