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. AJAX验证用户是否存在

    <html> <head> <title> ajax验证 </title> </head> <body> <input t ...

  2. ios英语口语800句应用源码

    前几天突发奇想做了个很水的应用,名字叫chinese 800(汉语口语800句),现在让别人传上去了(正在传). 今天又改了一下变成了英语口语800句.加了广告条 ui 没有优化,我随便整的两个图片, ...

  3. ADO.NET中的Connection详解

    连接字符串 1.写法一 "Data Source=服务器名; Initial Catalog=数据库; User ID =用户名; Password=密码; Charset=UTF8; &q ...

  4. JavaScript API 设计原则

    网+线下沙龙 | 移动APP模式创新:给你一个做APP的理由>> 好的 API 设计:在自描述的同时,达到抽象的目标. 设计良好的 API ,开发者可以快速上手,没必要经常抱着手册和文档, ...

  5. C# MongoDB--时区问题(差了8小时)

    原因:MongoDB中存储的时间是标准时间UTC +0:00C#的驱动支持一个特性,将实体的时间属性上添加上这个特性并指时区就可以了.例如:[BsonDateTimeOptions(Kind = Da ...

  6. php 实现多线程

    通过php的Socket方式实现php程序的多线程.php本身是不支持多线程的,那么如何在php中实现多线程呢?可以想一下,WEB服务器本身都是支持多线程的.每一个访问者,当访问WEB页面的时候,都将 ...

  7. C语言-sizeof()与strlen()的区别【转】

    先看看sizeof() 一.sizeof的概念 sizeof是C语言的一种单目操作符,如C语言的其他操作符++.--等.它并不是函数.sizeof操作符以字节形式给出了其操作数的存储大小.操作数可以是 ...

  8. linux下的声卡驱动架构

    1.linux下的声卡驱动架构主要分为OSS架构和ALSA架构. 2.OSS架构 OSS全称是Open Sound System,叫做开放式音频系统,这种早期的音频系统这种基于文件系统的访问方式,这意 ...

  9. xcode4.5应用程序本地化

    我们在开发一款APP的时候,总是会涉及应用程序国际化的事情,用ios里专业术语叫做本地化,其实都是一个意思,简而言之就是不同的系统语言,显示不同的应用名称.字符串名称.图片名称.等等,除了代码,ios ...

  10. C# 处理csv格式的Excel文件代码

    public class CSVFileHelper { /// <summary> /// 将DataTable中数据写入到CSV文件中 /// </summary> /// ...