Home
> DBA Scripts, Oracle, Oracle 10g, Oracle 9i, Performance, SQL, SQL Tuning, System Queries > Oracle – Check Users Connected to Database
Oracle – Check Users Connected to Database
To find how many users are on the database issue the following:
SQL> SELECT username
FROM v$session;
Show what users are running
SQL> SELECT a.sid
, a.serial#
, a.username
, b.sql_text
FROM v$session a
, v$sqlarea b
WHERE a.sql_address=b.address;
You can add the following to the script if you have a lot of users and want to find one specific users code, but you will need to remove a.username from the above script:
AND a.username = '<username>';
Categories: DBA Scripts, Oracle, Oracle 10g, Oracle 9i, Performance, SQL, SQL Tuning, System Queries
find scripts running, oracle dba script, v$session, v$sqlarea
I am issuing like this
select username from v$session. it is showing some usernames are null what is the meaning of it
If you were to look in OEM you would see that those are sys$background sessions, things like QMON, EMON etc