[转帖]Oracle EBS中查询Profile的各种SQL_Hadoop,ERP及大数据讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  Hadoop,ERP及大数据讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 2835 | 回复: 0   主题: [转帖]Oracle EBS中查询Profile的各种SQL        上一篇   下一篇 
    本主题由 koei123 于 2015-6-1 15:14:42 移动
landy
注册用户
等级:新兵
经验:61
发帖:72
精华:0
注册:2011-12-31
状态:离线
发送短消息息给landy 加好友    发送短消息息给landy 发消息
发表于: IP:您无权察看 2015-3-24 15:52:16 | [全部帖] [楼主帖] 楼主

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



  1. set long 10000  
  2. set pagesize 500  
  3. set linesize 160  
  4. column SHORT_NAME format a30  
  5. column NAME format a40  
  6. column LEVEL_SET format a15  
  7. column CONTEXT format a30  
  8. column VALUE format a40  
  9. select p.profile_option_name SHORT_NAME,  
  10. n.user_profile_option_name NAME,  
  11. decode(v.level_id,  
  12. 10001, 'Site',  
  13. 10002, 'Application',  
  14. 10003, 'Responsibility',  
  15. 10004, 'User',  
  16. 10005, 'Server',  
  17. 10006, 'Org',  
  18. 10007, decode(to_char(v.level_value2), '-1', 'Responsibility',  
  19. decode(to_char(v.level_value), '-1', 'Server',  
  20. 'Server+Resp')),  
  21. 'UnDef') LEVEL_SET,  
  22. decode(to_char(v.level_id),  
  23. '10001', '',  
  24. '10002', app.application_short_name,  
  25. '10003', rsp.responsibility_key,  
  26. '10004', usr.user_name,  
  27. '10005', svr.node_name,  
  28. '10006', org.name,  
  29. '10007', decode(to_char(v.level_value2), '-1', rsp.responsibility_key,  
  30. decode(to_char(v.level_value), '-1',  
  31. (select node_name from fnd_nodes  
  32. where node_id = v.level_value2),  
  33. (select node_name from fnd_nodes  
  34. where node_id = v.level_value2)||'-'||rsp.responsibility_key)),  
  35. 'UnDef') "CONTEXT",  
  36. v.profile_option_value VALUE  
  37. from fnd_profile_options p,  
  38. fnd_profile_option_values v,  
  39. fnd_profile_options_tl n,  
  40. fnd_user usr,  
  41. fnd_application app,  
  42. fnd_responsibility rsp,  
  43. fnd_nodes svr,  
  44. hr_operating_units org  
  45. where p.profile_option_id = v.profile_option_id (+)  
  46. and p.profile_option_name = n.profile_option_name  
  47. and upper(p.profile_option_name) in ( select profile_option_name  
  48. from fnd_profile_options_tl  
  49. where upper(user_profile_option_name)  
  50. like upper('%&user_profile_name%'))  
  51. and usr.user_id (+) = v.level_value  
  52. and rsp.application_id (+) = v.level_value_application_id  
  53. and rsp.responsibility_id (+) = v.level_value  
  54. and app.application_id (+) = v.level_value  
  55. and svr.node_id (+) = v.level_value  
  56. and org.organization_id (+) = v.level_value  
  57. 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


  1. SELECT   p.profile_option_name                                                                                                     profile_option_name                                                                ,  
  2.          n.user_profile_option_name                                                                                                user_profile_option_name                                                                      ,  
  3.          DECODE(v.level_id, 10001, 'Site', 10002, 'Application', 10003, 'Responsibility', 10004, 'User', 10005, 'Server', 'UnDef') LEVEL_SET                                                                 ,  
  4.          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",  
  5.          v.profile_option_value VALUE  
  6. FROM     fnd_profile_options p      ,  
  7.          fnd_profile_option_values v,  
  8.          fnd_profile_options_tl n   ,  
  9.          fnd_user usr               ,  
  10.          fnd_application app        ,  
  11.          fnd_responsibility rsp     ,  
  12.          fnd_nodes svr              ,  
  13.          hr_operating_units org  
  14. WHERE    p.profile_option_id       = v.profile_option_id (+)  
  15. AND      p.profile_option_name     = n.profile_option_name  
  16. AND      usr.user_id (+)           = v.level_value  
  17. AND      rsp.application_id (+)    = v.level_value_application_id  
  18. AND      rsp.responsibility_id (+) = v.level_value  
  19. AND      app.application_id (+)    = v.level_value  
  20. AND      svr.node_id (+)           = v.level_value  
  21. AND      org.organization_id (+)   = v.level_value  
  22. AND      v.PROFILE_OPTION_VALUE LIKE '207'  
  23. ORDER BY short_name,level_set;  


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


  1. select p.profile_option_name SHORT_NAME,  
  2. n.user_profile_option_name NAME,  
  3. decode(v.level_id,  
  4. 10001, 'Site',  
  5. 10002, 'Application',  
  6. 10003, 'Responsibility',  
  7. 10004, 'User',  
  8. 10005, 'Server',  
  9. 'UnDef') LEVEL_SET,  
  10. decode(to_char(v.level_id),  
  11. '10001', '',  
  12. '10002', app.application_short_name,  
  13. '10003', rsp.responsibility_key,  
  14. '10005', svr.node_name,  
  15. '10006', org.name,  
  16. '10004', usr.user_name,  
  17. 'UnDef') "CONTEXT",  
  18. v.profile_option_value VALUE  
  19. from fnd_profile_options p,  
  20. fnd_profile_option_values v,  
  21. fnd_profile_options_tl n,  
  22. fnd_user usr,  
  23. fnd_application app,  
  24. fnd_responsibility rsp,  
  25. fnd_nodes svr,  
  26. hr_operating_units org  
  27. where p.profile_option_id = v.profile_option_id (+)  
  28. and p.profile_option_name = n.profile_option_name  
  29. and usr.user_id (+) = v.level_value  
  30. and rsp.application_id (+) = v.level_value_application_id  
  31. and rsp.responsibility_id (+) = v.level_value  
  32. and app.application_id (+) = v.level_value  
  33. and svr.node_id (+) = v.level_value  
  34. and org.organization_id (+) = v.level_value  
  35. and Upper(n.user_profile_option_name) like upper('INV:Debug Level')  
  36. order by short_name  
  37. where you will prompt for the User_Profile_Option_Name you want to check and you will put the  
  38. Profile name that you want to check, for example: Apps Servlet Agent  
  39. If you want to check on the users level then you can append a condition : and v.level_id = 10004,  
  40. same goes for Responsibility level then append the condition v.level_id = 10003.  
  41. If you want for a certain user, then you can append a condition: and usr.user_name = '&User_Name'  
  42. where you will prompt for the User_Name and then you will put the user you want to check, for  
  43. example: SYSADMIN  



--转自 北京联动北方科技有限公司



该贴由koei123转至本版2015-6-1 15:14:42



赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论