--查询系统中配置文件的配置情况
SELECT OP.PROFILE_OPTION_ID,
TL.PROFILE_OPTION_NAME,
TL.USER_PROFILE_OPTION_NAME,
LV.LEVEL_ID,
LV.文件安全性,
VA.LEVEL_VALUE,
CASE
WHEN VA.LEVEL_ID = 10001 THEN '地点'
WHEN VA.LEVEL_ID = 10002 THEN (SELECT FAV.APPLICATION_NAME
FROM FND_APPLICATION_VL FAV
WHERE FAV.APPLICATION_ID = VA.LEVEL_VALUE)
WHEN VA.LEVEL_ID = 10003 THEN (SELECT /* $HEADER$ */
T.RESPONSIBILITY_NAME
FROM FND_RESPONSIBILITY_TL T,
FND_RESPONSIBILITY B
WHERE T.RESPONSIBILITY_ID = VA.LEVEL_VALUE
AND T.RESPONSIBILITY_ID = B.RESPONSIBILITY_ID
AND B.APPLICATION_ID = T.APPLICATION_ID
AND NVL(B.END_DATE, SYSDATE + 1) = SYSDATE
AND NVL(B.START_DATE, SYSDATE - 1) < SYSDATE
AND T.LANGUAGE = 'ZHS')
WHEN VA.LEVEL_ID = 10004 THEN (SELECT USER_NAME
FROM FND_USER
WHERE USER_NAME NOT IN
('*ANONYMOS*',
'CONVERSION',
'INITIAL SETUP',
'FEEDER SYSTEM',
'CONCURRENT MANAGER',
'STANDALONE BATCH PROCESS')
AND USER_ID = VA.LEVEL_VALUE
AND NVL(END_DATE, SYSDATE + 1) > SYSDATE
AND NVL(START_DATE, SYSDATE - 1) = SYSDATE)
WHEN VA.LEVEL_ID = 10005 THEN(SELECT NODE_NAME FROM FND_NODES WHERE NODE_ID = VA.LEVEL_VALUE)
WHEN VA.LEVEL_ID = 10006 THEN (SELECT NAME
FROM HR_OPERATING_UNITS
WHERE ORGANIZATION_ID = VA.LEVEL_VALUE)
ELSE
''
END AS PROFILE_LEVEL_VALUE,
VA.PROFILE_OPTION_VALUE
FROM FND_PROFILE_OPTIONS_TL TL,
FND_PROFILE_OPTIONS OP,
FND_PROFILE_OPTION_VALUES VA,
(SELECT 10001 LEVEL_ID, '地点' 文件安全性
FROM DUAL
UNION
SELECT 10002 LEVEL_ID, '应用产品' 文件安全性
FROM DUAL
UNION
SELECT 10003 LEVEL_ID, '责任' 文件安全性
FROM DUAL
UNION
SELECT 10004 LEVEL_ID, '用户' 文件安全性
FROM DUAL
UNION
SELECT 10005 LEVEL_ID, '服务器' 文件安全性
FROM DUAL
UNION
SELECT 10006 LEVEL_ID, '组织' 文件安全性
FROM DUAL) LV
WHERE TL.LANGUAGE = 'ZHS'
AND TL.PROFILE_OPTION_NAME = OP.PROFILE_OPTION_NAME
AND VA.PROFILE_OPTION_ID = OP.PROFILE_OPTION_ID
AND VA.LEVEL_ID = LV.LEVEL_ID
--AND TL.PROFILE_OPTION_NAME like '%'
--AND TL.USER_PROFILE_OPTION_NAME like '%'
--查询系统中配置文件的创建情况
SELECT PROFILE_OPTION_NAME 配置文件名,
USER_PROFILE_OPTION_NAME 用户配置文件名,
DESCRIPTION 说明,
HIERARCHY_TYPE 层次结构类型,
SITE_ENABLED_FLAG 地点可见,
SITE_UPDATE_ALLOWED_FLAG 地点可更新,
APP_ENABLED_FLAG 应用产品可见,
APP_UPDATE_ALLOWED_FLAG 应用产品可更新,
RESP_ENABLED_FLAG 责任可见,
RESP_UPDATE_ALLOWED_FLAG 责任可更新,
SERVER_ENABLED_FLAG 服务器可见,
SERVER_UPDATE_ALLOWED_FLAG 服务器可更新,
--SERVERRESP_ENABLED_FLAG 服务器职责可见,
--SERVERRESP_UPDATE_ALLOWED_FLAG 服务器职责可更新,
ORG_ENABLED_FLAG 组织可见,
ORG_UPDATE_ALLOWED_FLAG 组织可更新,
USER_ENABLED_FLAG 用户可见,
USER_UPDATE_ALLOWED_FLAG 用户可更新,
START_DATE_ACTIVE 有效起始日期,
END_DATE_ACTIVE 有效截止日期,
USER_VISIBLE_FLAG 用户访问可查看,
USER_CHANGEABLE_FLAG 用户访问可更新,
READ_ALLOWED_FLAG 可读,
WRITE_ALLOWED_FLAG 可写,
SQL_VALIDATION SQL验证,
PROFILE_OPTION_ID 配置文件配置情况ID
FROM FND_PROFILE_OPTIONS_VL
--WHERE (PROFILE_OPTION_NAME LIKE '%')