Archive log mode – On and Off

To Turn on first set your log_archive_dest to a location with enough space to hold the logs.

SQL> show parameter log_archive_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest                     string
log_archive_dest_1                   string      LOCATION=/oraarch/DW2

SQL> ALTER SYSTEM SET log_archive_dest_1='location=/u01/MYDW/archive/';

system altered

SQL> show parameter log_archive_dest

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest                     string
log_archive_dest_1                   string      LOCATION=/u01/MYDW/archive/

Then start archive logging:

Shutdown immediate;
startup mount;
ALTER database archivelog;
ALTER SYSTEM ARCHIVE LOG START;
ALTER database open;

To turn off archive logging:

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

Several ways to check archive logging details:

show parameter archive
archive log list
select log_mode from v$database;

and also via Archive log views:

V$ARCHIVED_LOG
V$ARCHIVE_DEST
V$ARCHIVE_PROCESSES

To Switch the actual archive log:

alter system switch logfile;

To Archive all archive groups:

alter system archive log all;

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: