Oracle database use

Hey how do I find if anyone accessing oracle 11g database on linux. I mean which users are accessing the database and what are there doing. I really appreciate your help. Thanks in advance
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

where status = 'ACTIVE'
select username,sid, status,program,server,type,serial#
from v$session order by username
where status = 'ACTIVE'

Try this instead of select * from
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

slightwv (䄆 Netminder) Commented:
To get 'what' they are doing and when, you need to turn on auditing.

V$session will tell you who is currently logged in but not a history of who was logged in over time.

You can also look in the listener log file to see who has been connecting.
I find that having status='ACTIVE' actually filters out some users who are online but are currently not running anything.

This is what I use:

select a.username, b.sql_text, a.status
from v$session a, v$sqlarea b
where a.sql_address = b.address(+)
and a.username is not null;
More detail you can also use based on @johanntagle

select a.sid, a.serial#, b.sql_text,a.username,b.sql_text,a.status
  from v$session a, v$sqlarea b
  where a.sql_address=b.address(+)
  and a.username is not null

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
turn on auditting to get a historical list of activity

the results will be in DBA_AUDIT_TRAIL
I sometimes use this also

select sid, serial#, username, a.status
  from v$session a, v$sqlarea b
 where b.hash_value = a.prev_hash_value
 and a.username is not null;
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.