Please note that even though it looks very similar, it's not a duplicate question with this link: How to list active / open connections in Oracle?
I'm not asking about the number of sessions, but connections. I'm aware that I can query the v$session view, but I don't know how many connections are being used there. If there is a way to derive from it, please enlighten me.
EDIT: I'm asking about the physical database connection to the database.
By default, SQL Server allows a maximum of 32767 concurrent connections which is the maximum number of users that can simultaneously log in to the SQL server instance.
The active or total connection can be known with the help of threads_connected variable. The variable tells about the number of currently open connections. mysql> show status where `variable_name` = 'Threads_connected'; Here is the output.
Bit confused with your statement I'm not asking about the number of sessions, but connections
.
Conceptually both are same. Every active session will correspond to a underlying active connection to the database.
Now, if you meant to know the max allowed connection limit then Documentation says
Maximum number of connections (system and application) across all databases in an instance = 2048
To know the allowed session configured to your database, you can query v$parameter
view like
SELECT name, value
FROM v$parameter
WHERE name = 'sessions'
If you want to know the Active
session at any instance Out of total configured to allow then you can query v$session
view using the Status
column like
SELECT COUNT(*)
FROM v$session
WHERE STATUS = 'ACTIVE'
You may want to refer this post How to check the maximum number of allowed connections to an Oracle database?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With