ARCHIVE_LAG_TARGET parameter in Oracle

ARCHIVE_LAG_TARGET parameter in Oracle

ARCHIVE_LAG_TARGET initialization parameter can be used to force a log switch to occur at regular time intervals. It generate the archive log at specified time if no activity is going in the database.
ARCHIVE_LAG_TARGET value defined in Seconds. Default it is disabled i.e 0 value.

Simply way to automate the switch command

--Manually
ALTER SYSTEM SWITCH LOGFILE;

–Automatic
Setting ARCHIVE_LAG_TARGET Parameter

--For disable as default
ALTER SYSTEM SET ARCHIVE_LAG_TARGET = 0 scope=both;

--For 15 minutes
ALTER SYSTEM SET ARCHIVE_LAG_TARGET = 900 scope=both;

-- For 30 minutes
ALTER SYSTEM SET ARCHIVE_LAG_TARGET = 1800 scope=both;

SQL> show parameter ARCHIVE_LAG_TARGET

NAME                   TYPE        VALUE
---------------------- ----------- --------
archive_lag_target     integer     0

Note:
1. If you don’t want to generate unwanted archive log generated by Oracle make this parameter value to ZERO.
2. Recommended value is 1800 i.e 30 minutes.
3. It useful in Dataguard environment if system has no transaction for long time then by this we generate force fully archive to apply on standby to minimize the data loss.
4. Extremely low value result in frequently log switch which result in low performance.

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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.