Search code examples
oracle-databaseoracle12c

How to confirm the number of connections in Oracle 12C?


Looks like this is a contentious topic but I don't seem to find any concrete answers on this.

V$Session table only lists the active sessions whereas connection pool implementations define limits with connection numbers.

Is there any way to get the number of active connections to an Oracle Database?


Solution

  • The instantaneous active sessions can be obtained from V$SESSION where STATUS column is ACTIVE.

    You perhaps are more interested in the average active sessions over time. This is tracked directly in the database in the V$SYSMETRIC_HISTORY view, under the metric (unsurprisingly) called: Average Active Sessions

    Hope this helps