Link to home
Start Free TrialLog in
Avatar of janthonyn
janthonyn

asked on

How can I write a SQL query to list all users in active session?

How do I write a SQL query that can list all the users in Oracle Applications that have an active session? Are there tables that show a session ID that can be joined to fnd_users either directly or indirectly?
ASKER CERTIFIED SOLUTION
Avatar of Jinesh Kamdar
Jinesh Kamdar
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of janthonyn
janthonyn

ASKER

When I say "user", mean end user, not database user like APPS or APPSYSPUB, etc
jinesh kamdar,

Your answer was closer to what I need. When I exclude a couple of obvious system names, applxxx and oraxxx (x's substituted for database name), I get usernames as defined by the Windows network through which we connect to our hosted Oracle database. I also connect directly to the database via a separate VPN. I don't see that listed in your query and it seems also to be missing allot of users I know are active now. It would also help if the table had a time logged on or could join to a view or table with that info.

jinesh,

I fiddled with the first sql you gave me, and it's closer if I add a few clauses
select from * v$session
where trunc(logon_time)> SYSDATE-1
order by osuser

But it still doesn't see everybody. I know some users that have been logged in all day and don't appear in the output of the query.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Not yet gotten what I'm looking for. Good suggestions though. i'll keep looking.
Still looking for the answer. I'll keep looking