I am trying to figure out how to get a count of the number of open sessions on our Oracle database. I have the sample Oracle SQL script running which grabs the up time, so I am at least able to connect to Oracle. But, trying to get the script to get the Open session is not working. What my Oracle DBA sent me to get the count and other info is.
select sid, serial#, username , schemaname , osuser from v$session order by schemaname /
Anyone know how to translate that into a script to get the count of sessions?
Cheers
Article Comments
Thanks for getting back to me. I ended up playing with this and have gotten it to work. This is what I am using to get the number of sessions
select sid, serial#, username , schemaname , osuser from v$session order by schemaname;
And then I had t tell the system to Count Table Rows and set the Primary Channel to Affected Rows
As another point, I also wanted to count the number of processes. To get that I used
Select count(*) from v$process;
and set the Sensor to Process Table Data, Sensor Channel #1 Name to Count(*), Sensor Channel #1 Column Name to Count(*), Select Channel Value by Column Name, and set Primary Channel to Count (*)
Pretty cool item to get working. Thanks for including this sensor. It is very nice!
Cheers
Dave
Feb, 2018 - Permalink
Glad you already got it up and running :) Have a great weekend!
Kind regards,
Stephan Linke, Tech Support Team
Feb, 2018 - Permalink
Could you provide me with the output of this? Simply use the table markup:
...results in:
Then I'll provide the corresponding configuration :)
Kind regards
Stephan Linke, Tech Support Team
Feb, 2018 - Permalink