Subscribe YouTube Channel For More Live Tutorials
Finding number of sessions (active/inactive) in a database?
some times, DB is slow of due to too many inactive sessions.
or sessions limit reached.
so we can find from gv$session or v$session
sql>select inst_id,program,module,status,count(*) from gv$session where type='USER' and status = 'INACTIVE' group by inst_id,program,module,status;
also can find sid,session# from gv$session for those inactive sessions
Note: Inactive sessions can be killed.
sql>alter system kill session ('&SID','&session');
Number of sessions status
sql>select sid,status,count(*) from gv$session group by sid,status;