Tuesday, February 2, 2010

How to know the sessions active in your Oracle database ?

The following query should give you the summary of users and the number of sessions held by them.

SQL> select schemaname, session_count from 
(select distinct schemaname, count(sid) as session_count from v$session group by schemaname) 
order by session_count desc;


-- To know the total number of sessions in progress...
SQL> select count(*) from v$session;

No comments:

Post a Comment