Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: March 05, 2017 - 6:57 pm UTC

Last updated: March 07, 2017 - 9:16 am UTC

Version: 11

Viewed 1000+ times

You Asked

Hi Tom,
My question is about SCN. As SCN are changed only at time of commit, Suppose we have two concurrent transcation T1 and T2 respectively, Say T1 starts and just after than T2 starts(note neither T1 nor T2 are committed at this point and there is no committed transcation between T1 and T2), Will T1 and T2 have same SCN read from system, if so why???because as per my understanding both T1 and T2 must have same SCN.

and Connor said...

SCN's are assigned at commit time. So when T1 commits, it will get scn=10, and when T2 commits it will get scn=11.

(In reality, there will most likely be a gap between 10 and 11, because all sorts of other activities will be going on in your database. Even if no-one else is connected, the background processes will be doing intermittent commits as they do work)

Big lengthy discussion on SCN's here

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

Is this answer out of date? If it is, please let us know via a Comment