1. 程式人生 > >ORACLE EBS 許可權查詢SQL

ORACLE EBS 許可權查詢SQL

1.查詢擁有某個配置檔案的使用者

SELECT t.level_id,
       fu.user_name,
       t.profile_option_value
  FROM fnd_profile_option_values t,
       fnd_user                  fu,
       fnd_profile_options       fpo
 WHERE t.profile_option_id = fpo.profile_option_id
   AND fpo.profile_option_name = 'DIAGNOSTICS'--查詢擁有診斷功能的使用者
   AND t.level_value = fu.user_id(+);

*EBS診斷功能可以配置如下兩個配置檔案:

隱藏診斷選單項

公用程式:診斷


2.查詢擁有“系統管理員”的使用者

 SELECT fu.user_name,
        hr.last_name,
        t.responsibility_name
   FROM fnd_user_resp_groups_direct fur,
        fnd_user                    fu,
        hr_employees                hr,
        fnd_responsibility_tl       t
  WHERE (fur.responsibility_id IN (20420))--系統管理員責任ID
    AND fur.user_id = fu.user_id
    AND fur.end_date IS NULL
    AND fu.end_date IS NULL
    AND fu.employee_id = hr.employee_id(+)
    AND fur.responsibility_id = t.responsibility_id
    AND fur.responsibility_application_id = t.application_id
    AND t.language = 'ZHS'
  ORDER BY fu.user_name;
**以上ID一般不用改,如果有問題自己去查詢對應系統責任的ID