Query to find out Total Numeber of session in database and currently total active session

SELECT

  'Currently, '

  || (SELECT COUNT(*) FROM V$SESSION)

  || ' out of '

  || VP.VALUE

  || ' connections are used.' AS USAGE_MESSAGE

FROM

  V$PARAMETER VP

WHERE VP.NAME = 'sessions';



Output:

USAGE_MESSAGE

--------------------------------------------------------------------------------

Currently, 1652 out of 3326 connections are used.


Or

select

  resource_name,

  current_utilization,

  max_utilization,

  limit_value

from

  v$resource_limit

where

  resource_name in ( 'sessions', 'processes');

 

RESOURCE_NAME

CURRENT_UTILIZATION

MAX_UTILIZATION

LIMIT_VALUE

processes

1599

3000

3000

sessions

1622

3265

4536

 


Comments