1.List E-Business Suite Profile Option Values For All Levels

SELECT p.profile_option_name SHORT_NAME,
       n.user_profile_option_name NAME,
       decode(v.level_id,
              10001,
              'Site',
              10002,
              'Application',
              10003,
              'Responsibility',
              10004,
              'User',
              10005,
              'Server',
              10006,
              'Org',
              10007,
              decode(to_char(v.level_value2),
                     '-1',
                     'Responsibility',
                     decode(to_char(v.level_value), '-1', 'Server', 'Server+Resp')),
              'UnDef') LEVEL_SET,
       decode(to_char(v.level_id),
              '10001',
              '',
              '10002',
              app.application_short_name,
              '10003',
              rsp.responsibility_key,
              '10004',
              usr.user_name,
              '10005',
              svr.node_name,
              '10006',
              org.name,
              '10007',
              decode(to_char(v.level_value2),
                     '-1',
                     rsp.responsibility_key,
                     decode(to_char(v.level_value),
                            '-1',
                            (SELECT node_name
                               FROM fnd_nodes
                              WHERE node_id = v.level_value2),
                            (SELECT node_name
                               FROM fnd_nodes
                              WHERE node_id = v.level_value2) || '-' ||
                            rsp.responsibility_key)),
              'UnDef') "CONTEXT",
       v.profile_option_value VALUE
  FROM fnd_profile_options       p,
       fnd_profile_option_values v,
       fnd_profile_options_tl    n,
       fnd_user                  usr,
       fnd_application           app,
       fnd_responsibility        rsp,
       fnd_nodes                 svr,
       hr_operating_units        org
WHERE p.profile_option_id = v.profile_option_id(+)
   AND p.profile_option_name = n.profile_option_name
   AND upper(p.profile_option_name) IN
       (SELECT profile_option_name
          FROM fnd_profile_options_tl
         WHERE upper(user_profile_option_name) LIKE
               upper('%&user_profile_name%'))
   AND usr.user_id(+) = v.level_value
   AND rsp.application_id(+) = v.level_value_application_id
   AND rsp.responsibility_id(+) = v.level_value
   AND app.application_id(+) = v.level_value
   AND svr.node_id(+) = v.level_value
   AND org.organization_id(+) = v.level_value
ORDER BY short_name,
          user_profile_option_name,
          level_id,
          level_set;

2.How to Search all of the Profile Options for a Specific Value

SELECT p.profile_option_name profile_option_name,
       n.user_profile_option_name user_profile_option_name,
       DECODE(v.level_id,
              10001,
              'Site',
              10002,
              'Application',
              10003,
              'Responsibility',
              10004,
              'User',
              10005,
              'Server',
              'UnDef') LEVEL_SET,
       DECODE(TO_CHAR(v.level_id),
              '10001',
              '',
              '10002',
              app.application_short_name,
              '10003',
              rsp.responsibility_key,
              '10005',
              svr.node_name,
              '10006',
              org.name,
              '10004',
              usr.user_name,
              'UnDef') "CONTEXT",
       v.profile_option_value VALUE
  FROM fnd_profile_options       p,
       fnd_profile_option_values v,
       fnd_profile_options_tl    n,
       fnd_user                  usr,
       fnd_application           app,
       fnd_responsibility        rsp,
       fnd_nodes                 svr,
       hr_operating_units        org
WHERE p.profile_option_id = v.profile_option_id(+)
   AND p.profile_option_name = n.profile_option_name
   AND usr.user_id(+) = v.level_value
   AND rsp.application_id(+) = v.level_value_application_id
   AND rsp.responsibility_id(+) = v.level_value
   AND app.application_id(+) = v.level_value
   AND svr.node_id(+) = v.level_value
   AND org.organization_id(+) = v.level_value
   AND v.PROFILE_OPTION_VALUE LIKE '%'
ORDER BY level_set;

3.How To Find All Users With A Particular Profile Option Set?

SELECT p.profile_option_name SHORT_NAME,
       n.user_profile_option_name NAME,
       decode(v.level_id,
              10001,
              'Site',
              10002,
              'Application',
              10003,
              'Responsibility',
              10004,
              'User',
              10005,
              'Server',
              'UnDef') LEVEL_SET,
       decode(to_char(v.level_id),
              '10001',
              '',
              '10002',
              app.application_short_name,
              '10003',
              rsp.responsibility_key,
              '10005',
              svr.node_name,
              '10006',
              org.name,
              '10004',
              usr.user_name,
              'UnDef') "CONTEXT",
       v.profile_option_value VALUE
  FROM fnd_profile_options       p,
       fnd_profile_option_values v,
       fnd_profile_options_tl    n,
       fnd_user                  usr,
       fnd_application           app,
       fnd_responsibility        rsp,
       fnd_nodes                 svr,
       hr_operating_units        org
WHERE p.profile_option_id = v.profile_option_id(+)
   AND p.profile_option_name = n.profile_option_name
   AND usr.user_id(+) = v.level_value
   AND rsp.application_id(+) = v.level_value_application_id
   AND rsp.responsibility_id(+) = v.level_value
   AND app.application_id(+) = v.level_value
   AND svr.node_id(+) = v.level_value
   AND org.organization_id(+) = v.level_value
   AND Upper(n.user_profile_option_name) LIKE upper('INV:Debug Level')
ORDER BY short_name;

where you will prompt for the User_Profile_Option_Name you want to check and you will put the Profile name that you want to check, for example: Apps Servlet Agent 
If you want to check on the users level then you can append a condition : and v.level_id = 10004,  same goes for Responsibility level then append the condition v.level_id = 10003.

If you want for a certain user, then you can append a condition: and usr.user_name = '&User_Name'  where you will prompt for the User_Name and then you will put the user you want to check, for  example: SYSADMIN

原文地址:http://www.cnblogs.com/benio/archive/2013/03/12/2955963.html

Oracle EBS中查询Profile的各种SQL【转载】的更多相关文章

  1. 【转】Oracle EBS中查询Profile的各种SQL

    参考 http://blog.csdn.net/pan_tian/article/details/7652968#t0 Using API FND_PROFILE.save to update pro ...

  2. Oracle EBS中分类账和法人实体 的关系(有sql语句实例)

    Oracle EBS中分类账和法人实体 的关系(有sql语句实例) 2012-12-06 16:05 2822人阅读 评论(0) 收藏 举报  分类: Oracle EBS(12)  Oracle数据 ...

  3. 转 oracle 正则表达式和查询最大文件号 SQL

    ###sample 1 https://www.cnblogs.com/lxl57610/p/8227599.html Oracle使用正则表达式离不开这4个函数: 1.regexp_like 2.r ...

  4. Oracle EBS - Setup: 配置文件Profile

    http://blog.csdn.net/lfl6848433/article/details/8696939 Oracle EBS - Setup: 配置文件Profile 1.诊断Diagnost ...

  5. oracle存储过程中使用execute immediate执行sql报ora-01031权限不足的问题

    oracle存储过程中使用execute immediate执行sql报ora-01031权限不足的问题 学习了:http://blog.csdn.net/royzhang7/article/deta ...

  6. 从Oracle数据库中查询前几个月数据时需要注意的一些问题

    在最近的一个项目中,有一个需求就是要查询数据库中前几个月的历史数据,但是由于自己考虑不全面造成了程序的bug,现在将这一块好好作一个总结,希望以后不再犯这种很低级的错误,首先贴出查询中用到的一个子函数 ...

  7. 关于Oracle GoldenGate中Extract的checkpoint的理解 转载

    什么是checkpoint? 在Oracle 数据库中checkpoint的意思是将内存中的脏数据强制写入到磁盘的事件,其作用是保持内存中的数据与磁盘上的数据一致.SCN是用来描述该事件发生的准确的时 ...

  8. oracle ebs中并发程序定义查询sql

    ---concurrent program define SELECT FCPV.CONCURRENT_PROGRAM_ID, FCPV.CONCURRENT_PROGRAM_NAME, FCPV.U ...

  9. Oracle 11g中查询CPU占有率高的SQL

    oracle版本:oracle11g 背景:今天在Linux中的oracle服务上,运用top命令发现许多进程的CPU占有率是100%. 操作步骤: 以进程PID:7851为例 执行以下语句: 方法一 ...

随机推荐

  1. 查找Safari相关迹证

    日前有取证的同好提及Safari,想了解详细步骤,因而在此再补充说明相关. 除了Winodws外,Mac OS X也有为数不少的使用者,以下便以OS X自带的Safari浏览器为例,来查看有哪些重要迹 ...

  2. Oracle多线程并行使用、关联与指定索引执行

    nologging AS SELECT /*+parallel(4) leading(s a) use_hash(A) index(s IDX_CS_SERVICE_RECORD_MD2_04) */ ...

  3. Linux下运行top命令显示的PR\NI\RES\SHR\S\%MEM TIME+都代表什么

    PID 进程号 USER 用户名 PR 优先级 NI nice值.负值表示高优先级,正值表示低优先级 RES 进程使用的.未被换出的物理内存大小,单位Kb S 进程状态: D 不可中断的睡眠状态 R ...

  4. linux查找日志常用命令

    1.查找文件test中目标字符串(xxxx)出现的行数位置grep -n xxxx  test 2.文件test从某一行(n)开始显示more +n  test 3.查询文件test中出现目标字符串x ...

  5. CTest

    一.初识CTest CTest是CMake集成的一个测试工具,在使用CMakeLists.txt文件编译工程的时候,CTest会自动configure.build.test和展现测试结果 CTest有 ...

  6. Centos6.5系统初学者基本系统配置1

    作为一个初步接触linux-Centos的菜鸟来说,Centos在基本软件安装是一件比较令人头疼的事情,下面我将我初步使用linux的一些问题进行了汇总和记录,希望对大家有所帮助,这些东西也是在网友的 ...

  7. 利用脚本设置本机IP地址

    各位同学,在日常工作中.常出现需要指定IP的地址的清况.为了解决这一个问题,我特意为自己编写了一段脚本.方便设定自己笔记本的IP地址.供大家参考. 其中包括无线wifi和有线网络设定两个IP的操作. ...

  8. 小木棍 (codevs 3498)题解

    [问题描述] 乔治有一些同样长的小木棍,他把这些木棍随意砍成几段,直到每段的长都不超过100. 现在,他想把小木棍拼接成原来的样子,但是却忘记了自己开始时有多少根木棍和它们的长度. 给出每段小木棍的长 ...

  9. 西门子MES解决方案SIMATIC IT在乳制品行业小试牛刀

    竞争的白热化,紧缩的产品利润,食品安全保障,越来越苛刻的法规要求和全球化的市场与品牌维持的重要性对乳品行业的企业提出了更高的要求,实施 MES将是企业唯一的出路. 自从“十一五”制造业信息化为MES正 ...

  10. 第六节:宿主如何使用AppDomain

    前面已经讨论了宿主以及宿主加载CLR的方式.同时还讨论了宿主如何告诉CLR创建和卸载AppDomain.为了使这些讨论更加具体,下面将描述一些常见的宿主和AppDomain使用情形.特别地,我要解释不 ...