Hamid Ali
Hamid Ali

Reputation: 43

Oracle 12c Database V$session values

Why was I seeing more than the active no. of connections in V$SESSION view? I am connected through SQL Developer and EM Express only but in V$SESSION its showing four connections with different SIDs. But after some more time it came to two connections. V$SESSION is dynamic View then why did it take that much time in update?

thanks

Upvotes: 2

Views: 4443

Answers (1)

Barbaros Özhan
Barbaros Özhan

Reputation: 65228

I think you use such a query

select *
 from v$session v
where ( v.USERNAME not like 'SYS%' and v.USERNAME != 'DBSNMP' )
  and  v.STATUS = 'ACTIVE' 
order by v.LOGON_TIME desc;

to display active sessions, and perhaps your database is of RAC(Real Application Clusters) type, and need to replace v$session with gv$session which shows more than one instances with inst_id column at the beginning of the select list.

Upvotes: 2

Related Questions