SQL语句 - 查询当前在线用户和系统的请求运行历史


查请求

SELECT req.request_id,
fcp.user_concurrent_program_name,
usr.user_name,
req.request_date,
trunc(SYSDATE) - trunc(request_date) days,
req.logfile_name,
req.outfile_name
FROM applsys.fnd_concurrent_requests req,
apps.fnd_concurrent_programs_vl fcp,
applsys.fnd_user usr
WHERE req.concurrent_program_id = fcp.concurrent_program_id
AND req.requested_by = usr.user_id
--AND fcp.user_concurrent_program_name LIKE 'Create%'
ORDER BY fcp.user_concurrent_program_name


在线用户

SELECT U.USER_NAME,
       APP.APPLICATION_SHORT_NAME,
       FAT.APPLICATION_NAME,
       FR.RESPONSIBILITY_KEY,
       FRT.RESPONSIBILITY_NAME,
       FFF.FUNCTION_NAME,
       FFT.USER_FUNCTION_NAME,
       ICX.FUNCTION_TYPE,
       ICX.FIRST_CONNECT,
       ICX.LAST_CONNECT
  FROM ICX_SESSIONS          ICX,
       FND_USER              U,
       FND_APPLICATION       APP,
       FND_APPLICATION_TL    FAT,
       FND_RESPONSIBILITY    FR,
       FND_RESPONSIBILITY_TL FRT,
       FND_FORM_FUNCTIONS    FFF,
       FND_FORM_FUNCTIONS_TL FFT
 WHERE 1 = 1
   AND U.USER_ID = ICX.USER_ID
   AND ICX.RESPONSIBILITY_APPLICATION_ID = APP.APPLICATION_ID
   AND FAT.APPLICATION_ID = ICX.RESPONSIBILITY_APPLICATION_ID
   AND FAT.LANGUAGE = 'ZHS'
   AND FR.APPLICATION_ID = ICX.RESPONSIBILITY_APPLICATION_ID
   AND FR.RESPONSIBILITY_ID = ICX.RESPONSIBILITY_ID
   AND FRT.LANGUAGE = 'ZHS'
   AND FRT.APPLICATION_ID = ICX.RESPONSIBILITY_APPLICATION_ID
   AND FRT.RESPONSIBILITY_ID = ICX.RESPONSIBILITY_ID
   AND FFF.FUNCTION_ID = ICX.FUNCTION_ID
   AND FFT.FUNCTION_ID = ICX.FUNCTION_ID
   AND ICX.DISABLED_FLAG != 'Y'
   AND ICX.PSEUDO_FLAG = 'N'
   AND (ICX.LAST_CONNECT +
       DECODE(FND_PROFILE.VALUE('ICX_SESSION_TIMEOUT'),
               NULL,
               ICX.LIMIT_TIME,
               0,
               ICX.LIMIT_TIME,
               FND_PROFILE.VALUE('ICX_SESSION_TIMEOUT') / 60) / 24) >
       SYSDATE
   AND ICX.COUNTER < ICX.LIMIT_CONNECTS;


本文标题:SQL语句 - 查询当前在线用户和系统的请求运行历史

本文链接:https://catonisland.cn/post/140.html

本文版权归作者所有,欢迎转载,转载请以文字链接的形式注明文章出处。

相关文章