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
hussainkhan22Asked:
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.

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

Try this instead of select * from
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

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.
0
johanntagleCommented:
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;
0
anumosesCommented:
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
0

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
sdstuberCommented:
turn on auditting to get a historical list of activity

the results will be in DBA_AUDIT_TRAIL
0
anumosesCommented:
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;
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.