Database Administration (MOSC)

MOSC Banner

How can I get Application username associated with a database session.

edited Nov 30, 2011 12:16AM in Database Administration (MOSC) 5 comments
How can I get Application username associated with a database session. While monitoring locks, I want to get Application username of the blocking SID. I tried to use below script, however the username column value comes as NULL.

Does anyone have an idea if fnd_logins table captures the Session_number, PID and SPID information correctly for all Application activity.

SELECT  s.sid,
        s.serial#,
        s.program "Client Program Name",
        fu.user_name,
               s.action,
        s.module,
        s.event, 
        s.seconds_in_wait
FROM v$process p,v$session s, apps.fnd_logins fl, apps.fnd_user fu
WHERE  s.sid in (SELECT a.sid sess

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center