Oracle Database / Connections & Oracle Net
Detect excessive Oracle application sessions from one client group
A connection pool leak can slowly consume available sessions even though most sessions are idle. Group sessions by service and application identity.
Environment and inputs: Oracle Database 19c baseline · SQL*Plus-compatible SQL unless RMAN, DGMGRL, ADRCI or a host shell is specified. Check release, patch level, edition and container first.
Start with this diagnostic
Run each example in the tool named in the guide: SQL, RMAN, DGMGRL or the host command shell. Replace example names with approved values. To query DBA and V$ views, use authorized catalog access in the correct database container. Do not add broad permissions just to run an example.
SELECT service_name, machine, program, status, COUNT(*) AS sessions FROM v$session WHERE type = 'USER' GROUP BY service_name, machine, program, status ORDER BY sessions DESC;
What the results mean
Large counts identify where to investigate, not whether every connection is leaked. Compare the snapshot with configured pool sizes and the number of application replicas.
Fix the cause and check again
Trend the group during normal and failed requests. Fix connection-close and transaction-handling paths in the application, then right-size the pool and verify recovery under load.
Before you make a change
Do not kill all inactive sessions: they may hold transactions or be valid pooled connections. Use GV$SESSION for a complete RAC-wide investigation.