Processes and sessions limits
When to use it
As part of the daily check, and first thing when users report that they cannot connect.
Run this
Script: 02_show_processes_limit.sql. Full version in Performance › Performance monitoring › Instance info.
SET LINESIZE 120
SET PAGESIZE 50
SET TRIMSPOOL ON
COLUMN resource_name FORMAT A12 HEADING 'Resource'
COLUMN current_utilization FORMAT 99,999 HEADING 'Current'
COLUMN max_utilization FORMAT 99,999 HEADING 'Max Used'
COLUMN initial_allocation FORMAT A12 HEADING 'Initial'
COLUMN limit_value FORMAT A12 HEADING 'Limit'
COLUMN pct_used FORMAT 990.99 HEADING 'Pct Used'
TTITLE CENTER 'Processes / Sessions Resource Limit' SKIP 1
SELECT
resource_name,
current_utilization,
max_utilization,
initial_allocation,
limit_value,
ROUND((current_utilization / limit_value) * 100, 2) AS pct_used
FROM gv$resource_limit
WHERE resource_name IN ('processes', 'sessions')
ORDER BY resource_name;
TTITLE OFF
How to read the output
current_utilizationis the number in use now.max_utilizationis the highest value since startup.pct_usedis current against the limit. As a common starting point, treat a value above about 80 percent as a warning; follow your team standard if it has one.- If
max_utilizationequals the limit, the database already hit the ceiling at least once since startup.
What to do next
- If usage is high, find out who holds the sessions: see "Who is connected" in chapter 4.
- Raising the
processesparameter needs a restart and a senior DBA decision. Do not change it yourself. - If connections are failing right now, go to "TNS-12520: cannot connect" in chapter 10.
Risk level
READ ONLY Safe to run at any time. It only queries the data dictionary.