Re: EM12c reporting two sessions with same SID

  • From: "Tim Gorman" <tim@xxxxxxxxx>
  • To: kellyn.potvin@xxxxxxxxx, martin.a.berger@xxxxxxxxx, rjoralist2@xxxxxxxxxxxxxxxxxxxxx
  • Date: Wed, 22 Aug 2012 17:41:03 +0000

SID and SERIAL# represent the "primary key" of V$SESSION, while INST_ID, SID, 
and SERIAL# represent the same for GV$SESSION.
The SID value, as in "index" into a fixed-sized array, does get re-used over 
time, but the SERIAL# is incremented each time.

Please note that SERIAL# has the value of "1" for all of the "background" 
sessions which do not get re-spawned...

SQL> select serial#, count(*) from gv$session where type = 'BACKGROUND' group 
by serial#;

 SERIAL# COUNT(*)
---------- ----------
 5806 1
 10290 1
 25 1
 19911 1
 1 50
 3 2
 17945 1
 93 1
 12699 1

9 rows selected.

So, because EM12c is sampling session information over time using ASH, then you 
might see the same SID value occur twice because it got reused during that 
sampling period.


-----Original Message-----
From: Kellyn Pot'vin [mailto:kellyn.potvin@xxxxxxxxx]
Sent: Wednesday, August 22, 2012 11:23 AM
To: martin.a.berger@xxxxxxxxx, rjoralist2@xxxxxxxxxxxxxxxxxxxxx
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: EM12c reporting two sessions with same SID

I'm making a few assumptions with my testing here, but I'm thinking it is 
coming from the samples that are pulled for top sessions. If you look, it 
should tell you down in the right hand corner, below the top sessions, how many 
samples were used to create the top sessions view. I was able to duplicate this 
in my environment. I executed a process that I knew would be identified as a 
top session, disconnected, then waited a bit, then reconnected and tried again. 
I did connect with the same sid, executed another high hit process and was able 
to see my SID show up twice in the list, this time in a different sample from 
ASH top session data when I drilled down.Hope this helps, Kellyn Pot'VinSenior 
Technical ConsultantEnkitecDBAKevlar.comRMOUG Director of Training Days 
2013~Tombez sept fois, se relever huit!________________________________ From: 
Martin Berger To: rjoralist2@xxxxxxxxxxxxxxxxxxxxx Cc: oracle-l@xxxxxxxxxxxxx 
Sent: Wednesday, August 22, 2012 9:53 AMSubject: Re: EM12c reporting two 
sessions with same SID Rich,I'd see it quite unlikely you can get the same SID 
twice on the sameinstance at any time.the column "SID" in v$session is mapped 
to X$KSUSE.indx - I don'texpect Oracle developers to call an internal column 
'index' if it'snot unique.not the best prove, maybe someone else can do 
better?MartinOn Wed, Aug 22, 2012 at 3:44 PM, Rich Jesse wrote:> Hey all,>> 
While I'm trying to debug some messes, I see that EM12c's Top Activity> 
historical data shows at least one 30-minute time period from this morning> 
where two of the Top Sessions have the same SID. Since I know the app> 
generating these two sessions must do so serially -- one will finish and> 
disconnect before the other starts -- could this really be the case? Can> two 
different direct-connect (no pooling) sessions created within a "short"> period 
of time have the same SID?>> Evidence is on 11.2.0.3, but I know I've also seen 
this on 10.1.0.5 (which> is now thankfully gone!).>> TIA!> Rich>> --> 
//www.freelists.org/webpage/oracle-l--http://www.freelists.org/webpage/oracle-l--//www.freelists.org/webpage/oracle-l

--
//www.freelists.org/webpage/oracle-l


Other related posts: