How to monitor JDBC pool size.

How to monitor JDBC pool size.

book

Article ID: KB0092558

calendar_today

Updated On:

Products Versions
TIBCO Fulfillment Order Management -
Not Applicable -

Description

Resolution:
JMX Way : JMX does provide connection pooling information. You can use applications such as JProfiler to connect to the running JVM and can go to the JDBC section to see the current active and inactive connections.

DB Way : Along with the application way of checking the active connections, users can check the total number of active and allowed connections on the database.

The following queries (run then as sysdba) can be used to find connections / sessions opened on the database.

SELECT username, count(username) sess
FROM v$session
where username like '%'
GROUP BY username
ORDER BY sess;

-OR-

(This query also gives max connections / sessions allowed on the database.)

  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'

========
Note , usually DBAs identify the connection pool max number based on their production like / performance environment by running an application multiple times with different max allowed numbers. There should at least be 5-10% connections still available during peak load.

Issue/Introduction

How to monitor JDBC pool size.