About Me.

My self Adinarayana working as Implementation Application DBA with advanced technologies like RAC/PCP,OID/SSO,DMZ,Exadata and Fusion Middleware i.e Demantra,Application Server,SOA,FMW,BPEL and UPK. Created this blog to share the useful information related to DBA and Application DBA Your comments and suggestions are most welcome. Disclaimer: Please note all the views and opinions expressed in this site are my own. It's not recommend to use the fixes/suggestions provided in this site directly in production instance, please test them before implementing.

Saturday, July 20, 2013

How To Identify The apps User Using The O/S PID For Forms Users In 11i

You have to pass the UNIX process id to this script.
------------------------------------Cut here--------------------------
column "User Name" format a10
column "ClPID" format a8

select
d.user_name "User Name",
       b.sid SID,b.serial# "Serial#", c.spid "srvPID", a.SPID "ClPID",
       to_char(START_TIME,'DD-MON-YY HH:MM:SS') "STime"
from
fnd_logins a, v$session b, v$process c, fnd_user d
where
b.paddr = c.addr
and a.pid=c.pid
and a.spid = b.process
and d.user_id = a.user_id
and (d.user_name = 'USER_NAME' OR 1=1)
and a.SPID = &PID

/
-----------------------------Script ends here-------------------------

No comments:

Post a Comment