Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Is ther any differnce between SCN and log sequence number?

Re: Is ther any differnce between SCN and log sequence number?

From: Anton Buijs <remove_aammbuijs_at_xs4all.nl>
Date: Tue, 22 Apr 2003 00:28:06 +0200
Message-ID: <3ea47072$0$49117$e4fe514c@news.xs4all.nl>

Peter <peter_at_nomorenewsspammin.ca> schreef in berichtnieuws tvq8av8013eg9ff3q91mvrirtshq6e6rok_at_4ax.com...
| Is ther any differnce between SCN and log sequence number?
| When there is a log switch, will there also be a SCN assocaited with
| it?

|

There is a big difference.
The SCN is an ever increasing number. Each new transaction gets the next SCN. In a distributed transaction, the highest one in both databases is taken. So it can make a big jump upwards too. The log sequence number is a sequence number used for redologs only. When there is a switch, it will be incremented. A log switch causes a checkpoint, an action that draws the next SCN too. It is shown in V$LOGHIST.SWITCH_CHANGE#. V$LOGHIST and V$ARCHIVED_LOG (when the db runs in archive log mode) shows you the SCN's included in that log (first_change#, next_change#)
An open resetlogs of the db will reset the log sequence number to zero. Never had a look at the scn, so don't know what happens with that. The SCN of a log switch is recorded in each datafile header indicating that that file is up-to-date to that scn (V$DATAFILE.CHECKPOINT_CHANGE#). It is also recorded in the controlfile, for each file and for the entire db. Received on Mon Apr 21 2003 - 17:28:06 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US