Tuesday, 28 January 2014

Query to find all current Oracle Application user logged in R12 & 11i

SELECT DISTINCT icx.session_id,
icx.user_id,
fu.user_name,
fu.description
FROM icx_sessions icx, fnd_user fu
WHERE disabled_flag != 'Y'
AND icx.pseudo_flag = 'N'
AND (last_connect +
DECODE (fnd_profile.VALUE ('ICX_SESSION_TIMEOUT'),
NULL, limit_time,
0 , limit_time,
fnd_profile.VALUE ('ICX_SESSION_TIMEOUT')/60) / 24) > SYSDATE
AND icx.counter < limit_connects
AND icx.user_id = fu.user_id;

==================================================

SELECT DISTINCT ic.disabled_flag,
fu.user_name User_Name,
fr.RESPONSIBILITY_KEY Responsibility,
fu.user_id,
fu.description,
fu.employee_id,
ic.responsibility_application_id,
ic.responsibility_id,
ic.org_id,
ic.function_type,
ic.counter,
ic.first_connect,
ic.last_connect,
ic.nls_territory,
ic.time_out,
fr.menu_id,
fr.responsibility_key
FROM fnd_user fu,
fnd_responsibility fr,
icx_sessions ic
WHERE fu.user_id = ic.user_id
AND fr.responsibility_id = ic.responsibility_id
AND ic.disabled_flag ='N'
and IC.RESPONSIBILITY_ID is not null
AND ic.last_connect > sysdate - (ic.time_out/60)/96;

No comments:

Post a Comment

Number of Visitors