[php]
[oracle@jumper udump]$ sqlplus "/ as sysdba"
SQL*Plus: Release 9.2.0.3.0 - Production on Thu Jun 17 15:27:37 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.2.0.3.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.3.0 - Production
SQL> ALTER SESSION SET EVENTS ' IMMEDIATE TRACE NAME FILE_HDRS LEVEL 10';
Recent entries in the redo thread of an Oracle instance are addressed using a 3-part redo byte address, or RBA. An RBA is comprised of
the log file sequence number (4 bytes)
the log file block number (4 bytes)
the byte offset into the block at which the redo record starts (2 bytes)
thread:1 rba0x6a.18fd.10)
0x6a = 106
这就是log sequence了
[php]
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /opt/oracle/oradata/hsjf/archive
Oldest online log sequence 104
Next log sequence to archive 106
Current log sequence 106
1.2 既然是Last SCN archived,那起码应该比log1.FIRST_CHANGE#还要大吧,log1归档了呀? http://www.ixora.com.au/notes/log_switch_triggers.htm有这么一段话
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).
同时http://www.ixora.com.au/tips/tuning/log_switch.htm还有这么一段话
A log switch is forced whenever the current SCN for a thread falls behind the force SCN recorded in the database entry section of the controlfile. The force SCN is one more than the highest high SCN of any log file reused in any thread.
但是单从这句话,有些地方还不太理解:
A log switch is forced whenever the current SCN for a thread falls behind the force SCN recorded in the database entry section of the controlfile. The force SCN is one more than the highest high SCN of any log file reused in any thread.
the current SCN for a thread 是指什么?并且这句话的前提是在In a parallel server environment,这又是指什么?
In a parallel server environment, the LGWR process in each instance holds a KK instance lock on its own thread. The id2 field identifies the thread number. This lock is used to trigger forced log switches from remote instances. A log switch is forced whenever the current SCN for a thread falls behind the force SCN recorded in the database entry section of the controlfile. The force SCN is one more than the highest high SCN of any log file reused in any thread.
For local log switches, the process initiating the log switch allocates a message buffer in the SGA and constructs a message to LGWR indicating that a log switch is required, before posting LGWR's semaphore.