What if session with the new id already exist?
A reader, July 19, 2004 - 3:45 pm UTC
consider [ for the time being ] the max value in my sequence is just 500. i started a session with id 1. 499 new session started and terminated. my session with id 1 still exist.
now while assigning id to new session does oracle check that id with nextval of sequence exist or not?
July 19, 2004 - 4:47 pm UTC
given that the sequence would not cycle that quickly -- i've never tried it. you'd have to try and see but it would take a really long time since
o the sequence doesn't cycle that rapidly
o altering it is forbidden unless support tells you to.
More than one record on v$session for sessionid
A reader, September 11, 2007 - 3:57 pm UTC
Hi Tom please, on 10.2.0.3 I got on a database the problem I get three records for the same sessionid on v$session on a trigger, I searched and I couldn't find the reason (it's not sysoper, sydba, etc. it isn't 0 ).
Do you know why I don't get only one record?.
Thank you :).
SELECT LOGON_TIME, OSUSER, MACHINE, PROGRAM
INTO cHI_FECHALOGON, cHI_USUARIOSIS , cHI_MAQUINA, cHI_PROGRAMA
FROM V$SESSION WHERE AUDSID = USERENV( 'SESSIONID' );
returns 3 records.
September 15, 2007 - 3:51 pm UTC
well, my first thought would have been "let me look at the three records and supply that information too - for they might have some HUGE CLUE in them as to what is happening"
no, no idea for you. I would suggest using
where sid = (select sid from v$mystat where rownum=1)
instead of the somewhat un-reliable audsid....
to A reader
Michel Cadot, September 16, 2007 - 2:42 am UTC
You can also use sys_context and userenv/sid:
SQL> select sid, to_number(sys_context('userenv','sid')) sid from v$mystat where rownum=1;
SID SID
---------- ----------
147 147
1 row selected.
Regards
Michel
Thank you Tom
A reader, September 18, 2007 - 5:25 pm UTC