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');