reg scn

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

reg scn

satish
Dear Erman,

could you please let us know what is importance of controlfile_change# and when it will be updated.we would also like to know the difference between current_scn and controlfile_change#

Thank you
Reply | Threaded
Open this post in threaded view
|

Re: reg scn

ErmanArslansOracleBlog
Administrator
CONTROLFILE_CHANGE# : Last change# in backup control file.
CURRENT_SCN is the current scn.

Controlfile_change# is updated when the "controlfile" is updated. It is updated with the scn of the last control file update.

For instance, during a checkpoint, the control file is updated.. So that controlfile_change# will change. There are also other events that causes Oracle to update the controlfile..file).

SCN is Oracle's clock. So Current SCN is the current clock. Every time we commit, the SCN increments.
Reply | Threaded
Open this post in threaded view
|

Re: reg scn

satish
Erman,

Is SCN recorded only for commited transaction?
Reply | Threaded
Open this post in threaded view
|

Re: reg scn

ErmanArslansOracleBlog
Administrator
after the commit. (when you see "committed", you can think like SCN is changed.)
Reply | Threaded
Open this post in threaded view
|

Re: reg scn

Satish
Does this CONTROLFILE_CHANGE# has any role in crash recovery?
Reply | Threaded
Open this post in threaded view
|

Re: reg scn

ErmanArslansOracleBlog
Administrator
This is a different question. Please create a seperate issue for this.
Reply | Threaded
Open this post in threaded view
|

Re: reg scn

satish
Dear erman,

Thanks for the update,i have raised a new thread.
Little more clarification needed regarding original question.
sometimes even redologs have uncommited transactions,so will these uncommited transactions on disk may have the scn?
OR
only committed transactions in redologs will have the SCN?
Reply | Threaded
Open this post in threaded view
|

Re: reg scn

ErmanArslansOracleBlog
Administrator
My statement is clear.
Every time we commit, SCN increments.

Here is what Tom Kyte says ->

scn's are written to redo logs continuously - when you commit they are emitted into the redo stream.
and semantically speaking, after the checkpoint COMPLETES, not after the checkpoint is INITIATED..

Ref: https://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:48052838748707

Reply | Threaded
Open this post in threaded view
|

Re: reg scn

Satish
Thanks erman