Log switches may also be forced automatically in relatively idle threads of an Oracle parallel server database, to secure recoverability.
Whenever a log file is reused in any thread,
the force SCN recorded in the database entry of the controlfile is advanced to 1 beyond the high SCN of the reused log file
(unless the force SCN was already higher).
If the low SCN for the current log file in any enabled thread thereby falls behind the force SCN, a log switch is forced in that thread.
This allows that log file to be archived.
Until that log file is archived,
newer redo in the archived copy of the recently reused log file might not be able to be applied in some recovery scenarios,
or to a standby database.
If a thread requiring a forced log switch is not open,
the instance that raised the force SCN will perform the log switch on behalf of the closed thread,
and the first available ARCn process in any instance will archive the log file.
However, if the thread is open, its instance is prompted to perform these actions itself.
This is done by taking a KK instance lock.
The LGWR process in each instance holds the KK instance lock on its own thread.
The id2 field identifies the thread number.
When this lock is taken by another instance, LGWR recognizes that a forced log switch is required.