Enable/Disable Archive Log Mode on Oracle Database 10g/11g
How are we choosing to enable or disable archivelog
Archivelog Mode
- You can perform a backup when the database is online(Hot backup) and the database is offline(Cold Backup) that means if You see a problems or disasters something with your database then you’ll have the copy data and archive the log file to recover a database(current data) but it necessary, You have to reserve space for archive log and perform backup archive log as well.
No-Archivelog Mode
- You can only perform a backup when the database is offline, then if You see a problem or disaster or lost something with your database then you’ll have a copy of the data but that is the last full offline backup so you don’t have archive log to recover a database(current data).
Enable Archive Log Mode
[oracle@labdbT1 ~]$ sqlplus “/as sysdba”
SQL*Plus: Release 11.2.0.1.0 Production on Fri Feb 15 11:39:46 2012 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: SQL> SQL> archive log list System altered. SQL> archive log list Total System Global Area 3273641984 bytes Database altered. SQL> archive log list Database altered. SQL> archive log list System altered. SQL> archive log list |
Disable Archive Log Mode
SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination /home/oracle/arch Oldest online log sequence 6 Next log sequence to archive 8 Current log sequence 8 SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount; ORACLE instance started.Total System Global Area 3273641984 bytes Fixed Size 2217792 bytes Variable Size 1795164352 bytes Database Buffers 1459617792 bytes Redo Buffers 16642048 bytes Database mounted. SQL> archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination /home/oracle/arch Oldest online log sequence 6 Next log sequence to archive 8 Current log sequence 8 SQL> alter database noarchivelog;Database altered.SQL> archive log list Database log mode No Archive Mode Automatic archival Disabled Archive destination /home/oracle/arch Oldest online log sequence 6 Current log sequence 8 SQL> alter database open;Database altered.SQL> archive log list Database log mode No Archive Mode Automatic archival Disabled Archive destination /home/oracle/arch Oldest online log sequence 6 Current log sequence 8 |