Init parameterRedo, undo & archiving
ARCHIVE_LAG_TARGET
What it controls
Forces a log switch after this many seconds, even when the database is quiet.
Know this before you change it
1800 is a common choice. It caps how much redo sits unarchived, which matters for Data Guard and for recovery point objectives.
Default: 0
Check and change it
1-- Current value on every instance2SELECT inst_id, name, value, isdefault, ismodified3FROM gv$parameter4WHERE name = 'archive_lag_target';5 6-- Value stored in the spfile7SELECT sid, value FROM v$spparameter WHERE name = 'archive_lag_target' AND isspecified = 'TRUE';8 9-- Dynamic: takes effect now and is kept after a restart10ALTER SYSTEM SET archive_lag_target = 1800 SCOPE = BOTH SID = '*';11 12-- Remove it from the spfile to go back to the default at the next restart13ALTER SYSTEM RESET archive_lag_target SCOPE = SPFILE SID = '*';Related scripts
- Log switches per hour, last 7 daysA day-by-hour grid of log switches. Aim for roughly four an hour at peak; consistently more means the redo logs are too small.
Open in the parameter referenceOracle's reference
More in Redo, undo & archiving
- UNDO_RETENTIONSeconds of committed undo Oracle tries to keep, for long queries and Flashback Query.
- UNDO_TABLESPACEWhich undo tablespace the instance uses. Each RAC instance has its own.
- LOG_ARCHIVE_DEST_NWhere archived redo goes: a local location or a Data Guard standby service. Numbered 1 to 31.
- LOG_ARCHIVE_FORMATFile name pattern for archived logs written to a plain directory.
- LOG_BUFFERSize of the redo log buffer.
- FAST_START_MTTR_TARGETTarget seconds for crash recovery. Oracle writes dirty blocks early enough to meet it.