Skip to Main Content
  • Questions
  • Number of connections and sessions in a given time


Question and Answer

Connor McDonald

Thanks for the question, Geraldo.

Asked: April 03, 2020 - 4:00 pm UTC

Answered by: Connor McDonald - Last updated: April 09, 2020 - 1:12 am UTC

Category: Database Administration - Version: 18.6

Viewed 100+ times

You Asked

Hello, Ask Tom Team.

I would like to know the number of sessions and connections to an Oracle database in a given time.

Thanks in advanced.

and we said...

The database will capture a critical statistic here for you. "Average Active Sessions".

Here's a great slide deck on the background and importance of that statistic

Note that "connected sessions" is not the same as "active sessions". Active is someone doing something on the database *right now*, not just sitting there connected.

and you rated our response

  (2 ratings)



April 06, 2020 - 9:31 am UTC

Reviewer: Mikhail Velikikh from Dublin, Ireland


If you are looking for the number of sessions, then there are two AWR views that can help:

1. DBA_HIST_RESOURCE_LIMIT where resource_name = 'sessions':

2. DBA_HIST_SYSSTAT where stat_name = 'logons current'
Connor McDonald


April 09, 2020 - 1:12 am UTC

nice input

Follow Up

April 08, 2020 - 2:17 am UTC

Reviewer: Geraldo

Thanks for your responses.

I will check this info.
Chris Saxon


April 08, 2020 - 8:14 am UTC

You're welcome.

More to Explore


Check out more PL/SQL tutorials on our LiveSQL tool.