博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
EBS R12 查询EBS用户相关SQL
阅读量:4975 次
发布时间:2019-06-12

本文共 2687 字,大约阅读时间需要 8 分钟。

--R12查询EBS在线用户SQL 

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;

 

  SELECT FND.USER_NAME,

         ICX.RESPONSIBILITY_APPLICATION_ID,
         ICX.RESPONSIBILITY_ID,
         FRT.RESPONSIBILITY_NAME,
         ICX.SESSION_ID,
         ICX.FIRST_CONNECT,
         ICX.LAST_CONNECT,
         DECODE ( (ICX.DISABLED_FLAG),  'N', 'ACTIVE',  'Y', 'INACTIVE') STATUS
    FROM FND_USER FND, ICX_SESSIONS ICX, FND_RESPONSIBILITY_TL FRT
   WHERE     FND.USER_ID = ICX.USER_ID
         AND ICX.RESPONSIBILITY_ID = FRT.RESPONSIBILITY_ID
         AND ICX.DISABLED_FLAG <> 'Y'
         AND TRUNC (ICX.LAST_CONNECT) = TRUNC (SYSDATE)
ORDER BY ICX.LAST_CONNECT;

--监控concurrent 正在执行的sql
  SELECT A.SID, A.SERIAL#, B.SQL_TEXT
    FROM V$SESSION A, V$SQLTEXT B
   WHERE A.SQL_ADDRESS = B.ADDRESS AND A.SID = :P_SID
ORDER BY B.PIECE;

--查询某用户一年登录EBS失败的次数:
--用 apps/apps_password 登录:
SELECT COUNT (LOGIN_NAME)
  FROM FND_UNSUCCESSFUL_LOGINS L, FND_USER U
WHERE     L.USER_ID = U.CUSTOMER_ID
       AND ATTEMPT_TIME > (SELECT MAX (START_TIME)
                             FROM FND_LOGINS L
                            WHERE L.USER_ID = U.USER_ID)
       AND (ATTEMPT_TIME + 265) > SYSDATE
       AND U.USER_NAME = '<username>';

 

--查询用户登录次数
  SELECT PEO.PERSON_ID,
         PEO.FULL_NAME,
         FU.USER_ID,
         FU.USER_NAME,
         HL.LOCATION_CODE,
         HL.DESCRIPTION,
         COUNT (FL.USER_ID) AS LOGIN_TIMES
    FROM FND_USER FU,
         PER_ALL_PEOPLE_F PEO,
         PER_ALL_ASSIGNMENTS_F ASS,
         HR_LOCATIONS HL,
         FND_LOGINS FL
   WHERE     FU.EMPLOYEE_ID = PEO.PERSON_ID
         AND ASS.PERSON_ID = PEO.PERSON_ID
         AND ASS.LOCATION_ID = HL.LOCATION_ID
         AND FL.USER_ID(+) = FU.USER_ID
         AND FU.USER_NAME = :USER_NAME
GROUP BY PEO.PERSON_ID,
         PEO.FULL_NAME,
         FU.USER_ID,
         FU.USER_NAME,
         HL.LOCATION_CODE,
         HL.DESCRIPTION;

转载于:https://www.cnblogs.com/surinfo/p/5872421.html

你可能感兴趣的文章
对空间时钟的调查报告
查看>>
初步体验javascript try catch机制
查看>>
javaweb学习——session和Cookie实现购物车功能
查看>>
Android系统是目前最为流行的手机系统之一
查看>>
洛谷 2615 神奇的幻方——模拟
查看>>
【bzoj1085】【 [SCOI2005]骑士精神】启发式剪枝+迭代加深搜索
查看>>
C# 获取运行时间
查看>>
TraceView简单使用方法
查看>>
git config and options core.bare hard
查看>>
win10自动更新彻底关闭
查看>>
转:研读代码必须掌握的Eclipse快捷键
查看>>
转: 如何高效利用GitHub
查看>>
vmware打开虚拟级断电情况下,无法找到虚拟机文件
查看>>
java记录
查看>>
myeclipse 连接svn服务器验证位置时发生错误 404 forbidden
查看>>
11.19
查看>>
[JSOI2007] 文本生成器
查看>>
用表单验证数据
查看>>
论坛搭建
查看>>
php回调函数call_user_func和call_user_func_array详解
查看>>