-- Change SYSADMIN to whatever you need
SELECT DISTINCT usr.user_name,
TO_CHAR(icx.last_connect,'DD/MM/YYYY HH24:MI:SS') connect_time,
resp.responsibility_name,
icx.function_type,
vs.module,
vsq.sql_id,
vsq.sql_text
FROM icx_sessions icx,
fnd_user usr,
fnd_responsibility_tl resp,
fnd_logins fl,
v$process vp,
v$session vs,
v$sql vsq
WHERE icx.last_connect > sysdate - 30/60/24
AND icx.disabled_flag != 'Y'
AND icx.pseudo_flag = 'N'
AND icx.user_id = usr.user_id
AND icx.responsibility_id = resp.responsibility_id
AND resp.language = icx.language_code
AND icx.login_id = fl.login_id
AND fl.end_time IS NULL
AND fl.pid = vp.pid
AND fl.process_spid = vp.spid
AND vp.addr = vs.paddr
AND vs.module IS NOT NULL
AND vs.sql_address = vsq.address(+)
AND usr.user_name = 'SYSADMIN'
コメント