-- Executar com schema APPS, retorna os usuários do EBS logados e seus respectivos forms e modulos
SELECT
TO_CHAR(vs.logon_time, 'DD-MON-YY HH24:MI:SS') logon_time,
TRUNC(vp.spid) SPID,
vs.sid,
vs.serial#,
vs.status,
fu.description NOME_USUARIO,
fu.user_name USUARIO,
SUBSTR(DECODE(vs.module,'FNDSCSGN','MainMenu',fft.user_form_name),1,40) FORM_NAME,
SUBSTR(vs.module, 1, 10) module,
fs.effective_date date_track_date,
vs.action action_responsibility,
vs.status
,vs.program
,vs.osuser
,vs.username dbuser
,SUBSTR(vs.machine, 1, 10) server,
vs.resource_consumer_group,
TO_CHAR(fl.session_number) all_time_PUI_logons
FROM v$session vs,
v$process vp,
applsys.fnd_logins fl,
applsys.fnd_user fu,
applsys.fnd_sessions fs,
applsys.fnd_form ff,
applsys.fnd_form_tl fft
WHERE
vp.addr = vs.paddr
AND fl.spid = vs.process
AND fl.process_spid = vp.spid
AND fl.user_id = fu.user_id
AND vs.audsid = fs.session_id(+)
AND vs.module IS NOT NULL
AND ff.form_name(+) = vs.module
AND ff.form_id = fft.form_id(+)
AND ff.application_id = fft.application_id(+)
ORDER BY vs.logon_time;
SELECT
TO_CHAR(vs.logon_time, 'DD-MON-YY HH24:MI:SS') logon_time,
TRUNC(vp.spid) SPID,
vs.sid,
vs.serial#,
vs.status,
fu.description NOME_USUARIO,
fu.user_name USUARIO,
SUBSTR(DECODE(vs.module,'FNDSCSGN','MainMenu',fft.user_form_name),1,40) FORM_NAME,
SUBSTR(vs.module, 1, 10) module,
fs.effective_date date_track_date,
vs.action action_responsibility,
vs.status
,vs.program
,vs.osuser
,vs.username dbuser
,SUBSTR(vs.machine, 1, 10) server,
vs.resource_consumer_group,
TO_CHAR(fl.session_number) all_time_PUI_logons
FROM v$session vs,
v$process vp,
applsys.fnd_logins fl,
applsys.fnd_user fu,
applsys.fnd_sessions fs,
applsys.fnd_form ff,
applsys.fnd_form_tl fft
WHERE
vp.addr = vs.paddr
AND fl.spid = vs.process
AND fl.process_spid = vp.spid
AND fl.user_id = fu.user_id
AND vs.audsid = fs.session_id(+)
AND vs.module IS NOT NULL
AND ff.form_name(+) = vs.module
AND ff.form_id = fft.form_id(+)
AND ff.application_id = fft.application_id(+)
ORDER BY vs.logon_time;
Comentários
Postar um comentário