How to Turn Archiving ON and OFF

This article gives an overview of database archiving. The intended audience is database administrators and this applies to Oracle Server - Enterprise Edition - Version: 10.2.0.1 to 11.2.0.2

Advantages of Using Archive log mode:

ARCHIVELOG mode is necessary for creating on-line backups and for certain types of database recovery. Configuring the database to operate in ARCHIVELOG mode allows the user to perform complete and point-in-time recovery from media (disk) failures using off-line or on-line backups. If ARCHIVELOG mode is disabled, the database can be restored from a backup in case of failure, but it cannot be rolled forward from that to a point when failure occurred.

 Steps to Turn Archiving On

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount
ORACLE instance started.

Total System Global Area 7482626048 bytes
Fixed Size                  2214416 bytes
Variable Size            4093642224 bytes
Database Buffers         3355443200 bytes
Redo Buffers               31326208 bytes
Database mounted.

SQL>  alter database archivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL>  archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            /test01/dbs/arch
Oldest online log sequence     12968
Next log sequence to archive   12970
Current log sequence           12970
SQL>


Steps to Turn Archiving off


test> sqlplus sys as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Mon May 23 05:22:50 2011

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter password:

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate

Database closed.
Database dismounted.
ORACLE instance shut down.

SQL> startup mount
ORACLE instance started.

Total System Global Area 7482626048 bytes
Fixed Size                  2214416 bytes
Variable Size            4093642224 bytes
Database Buffers         3355443200 bytes
Redo Buffers               31326208 bytes
Database mounted.

SQL> alter database noarchivelog;

Database altered.

SQL> alter database open;

Database altered.

SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled
Archive destination            /test01/dbs/arch
Oldest online log sequence     12968
Current log sequence           12970

No comments:

Post a Comment