Database 11g

Thursday, October 29, 2015

Query to check Active & Inactive Sessions in RAC


> Here we can see its showing 98 active session and 174 inactive sessions from both the nodes.

> Oracle provides gv$ view for RAC databases which collects information from all the nodes in your  cluster.



SQL> select inst_id,username,status from gv$session where status='INACTIVE';

   INST_ID      USERNAME              STATUS
-----------------------------------------------------------------
         1              SYS                          INACTIVE
         2              SYS                          INACTIVE
         2              SYS                          INACTIVE
         2              SYS                          INACTIVE


SQL> select count(*) from gv$session where status='INACTIVE';

  COUNT(*)
-------------
        4


SQL> select count(*) from gv$session where status='ACTIVE';

  COUNT(*)
----------
        98


  • Using Below link You can find Active & Inactive Sesssion Excluding Oracle Default Users

http://moindba.blogspot.com/2020/03/how-to-find-active-inactive-sessions-of.html




Happy Learning ....

No comments:

Post a Comment