Log Switch Triggers 及Force SCN
A log switch is when Oracle stops writing to the current log file, closes it, opens the next log file, and begins writing to the new log file. There are three conditions that cause LGWR to perform. a log switch.
- The normal cause of a log switch is when a process generating redo is unable to allocate space in the log buffer, because there is insufficient space left in the current log file. That process posts LGWR to perform. a log switch, and the session sleeps on a log file switch completion wait event.
- Log switches may be forced manually in the current thread using the ALTER SYSTEM SWITCH LOGFILE command, or in all enabled threads using the ALTER SYSTEM ARCHIVE LOG CURRENT command.
- 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.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-695640/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- log file switch
- Query the duration of log switch
- nologging、force logging、supplemental log的理解
- [Oracle Script] Log switch statusOracle
- redo_log_switch_date
- LOG FILE SWITCH等待事件事件
- RedoLog Checkpoint 和 SCN關係
- NOLOGGING和FORCE LOGGING的理解
- oracle的scn及sequenceOracle
- Archive Log模式下Redo Log、Check Point和Switch LogHive模式
- alter system archive log current / all / switch logfileHive
- 2.5.11 指定 FORCE LOGGING 模式模式
- Specifying FORCE LOGGING Mode (82)
- 由oradebug poke推進scn理解scn base及scn wrap系列一
- Database Triggers and event attributes--Introduction[Blog 搬家]Database
- oracle switch logfile日誌切換及alter system checkpoint作了什麼Oracle
- switch logfile command 等待事件事件
- log file switch相關等待事件事件
- Database Triggers and event attributes--Event Attributes【Blog 搬家】Database
- Database Triggers and event attributes--Database System Events【Blog 搬家】Database
- Database Triggers and event attributes--DDL/Client Events【Blog 搬家】Databaseclient
- alter system archive log current和alter system switch logfileHive
- 日誌記錄模式(LOGGING 、FORCE LOGGING 、NOLOGGING)模式
- Performance Considerations of FORCE LOGGING Mode (84)ORMIDE
- 關於log file switch and checkpoint機制
- log file switch (checkpoint incomplete)等待事件事件
- Switch log 掛起的小問題
- 【等待事件】log file switch (checkpoint incomplete)事件
- alter system switch log file 與 archive log current/all 區別Hive
- ALTER SYSTEM SWITCH LOGFILE ALTER SYSTEM ARCHIVELOG CURRENT 區別Hive
- 425alter database force logging修改那裡Database
- [20180228]archivelog backup?log switch?Hive
- Oracle資料庫中NOLOGGING和FORCE LOGGING的理解Oracle資料庫
- Triggers 授權
- 最大效能模式DATAGUARD 搭建 及SWITCH模式
- alter system switch logfile和alter system archive log current的區別Hive
- alter system switch logfile 和 alter system archive log current 的區別Hive
- SCN, checkpoint 及資料庫的恢復資料庫