qsessions.sql

The qsessions script will display the user details for any sessions except sys conneted the database and a sum count of the user connections by schemaname.

SQL

col machine format a30
col username format a15
set lines 1000
set pages 128

select sid, serial#, username, status, schemaname, machine, service_name from v$session where username !=’SYS’;
select schemaname, count(*) as connections from v$session
group by schemaname;

Output

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s