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
-
Shut the database down:
shutdown immediate; -
Start the instance in mount mode:
startup mount; -
Enable archivelog mode:
alter database archivelog; -
Open the database:
alter database open; -
Verify:
archive log list;Database log modeshowsArchive ModeandAutomatic archivalshowsEnabled.
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
- Run all these steps as the SYS user.
- Take a full database backup after switching the mode.