Home > Archive Logs, DBA Scripts, Oracle, Oracle 10g, SQL, System Queries > Oracle – Archive Log Mode

Oracle – Archive Log Mode

Archive log mode is necessary for hot backups and point-in-time recovery to take place. By default the database is created in noarchivelog mode, however you would need to shutdown the database in order to perform a backup. Archivelog mode allows for hot backups to be run with the archive logs being included in the backup to allow for consistency.

In archivelog mode the database will make copies of completed redo logs, archive logfiles. The disadvantage of this is that until the archivelog for a redo log has been written, the redo log cannot be reused.

Parameters

The following parameters need to be set in order to use archivelog mode:

log_archive_start = TRUE
log_archive_dest_1 = 'LOCATION=/arch_dir_name'
log_archive_dest_state_1 = ENABLE
log_archive_format = %d_%t_%s.arc

Enable Archivelog Mode

You must first shutdown all instances of the database. Then startup one instance, enable archivelog mode, the restart the remaining instances.

SQL> shutdown immediate
SQL> startup mount
SQL> alter database archivelog;
SQL> alter database open;

Check Archivelog Mode

You can easily check if a database is running in archivelog mode by running the following:

SQL> Archive log list;

Disable Archivelog Mode

To disable archivelog mode you once again need to shutdown the database, startup mount, then disable archivelog mode:

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

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

%d bloggers like this: