|
Re: Where I can get the current system change number? [message #50319 is a reply to message #50311] |
Mon, 11 March 2002 09:10 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
to get the 'current' scn, issue the following query:
select max(start_scnb) from v$transaction;
which returns the highest SCN as of the start of any active transaction (this however ignores the overflow column 'start_scnw')
to get the current session's scn, issue the following query:
select
s.sid
, t.start_scnb
, t.start_scnw
from
v$session s
, v$transaction t
where
s.saddr = t.ses_addr
and
s.sid = ( select distinct sid from v$mystat );
i'm not sure if the current session id is visible in any other V$ views (which may improve on using a subquery and select distinct to retrieve it)
|
|
|