代码之家  ›  专栏  ›  技术社区  ›  Jonathan

如何在pl/sql中列出Oracle应用程序配置文件选项?

  •  0
  • Jonathan  · 技术社区  · 16 年前

    我管理几个Oracle应用程序环境,目前通过在每个环境中加载表单以及手动检查每个变量来检查许多环境中的配置文件选项,这需要很多时间。

    是否有一段代码可以列出配置文件选项,以及它们的应用级别和应用对象?

    4 回复  |  直到 13 年前
        1
  •  1
  •   Sten Vesterli    16 年前

    您需要查询 APPLSYS.FND_PROFILE_OPTIONS FND_PROFILE_OPTION_VALUES . 有关可以从中获取SQL的综合脚本,请查看以下内容: http://tipsnscripts.com/?p=16

        2
  •  1
  •   dandan78 Tom Cool    13 年前

    我希望这将帮助您在尝试跟踪用户的更改时获得更详细的信息。

    SELECT FP.LEVEL_ID "Level ID", 
         FPO.PROFILE_OPTION_NAME "PROFILE NAME",
         FP.LEVEL_VALUE "LEVEL VALUE",
         DECODE (FP.LEVEL_ID,
                 10001,
                 'SITE',
                 10002,
                 'APPLICATION',
                 10003,
                 'RESPONSIBILITY',
                 10004,
                 'USER')
            "LEVEL",
         DECODE (FP.LEVEL_ID,
                 10001,
                 'SITE',
                 10002,
                 APPLICATION_SHORT_NAME,
                 10003,
                 RESPONSIBILITY_NAME,
                 10004,
                 FL.USER_NAME)
            LVALUE,
         FPO.USER_PROFILE_OPTION_NAME "PROFILE DESCRIPTION",
         FP.PROFILE_OPTION_VALUE "PROFILE VALUE",
         FU.USER_NAME "USER NAME",
         FU.LAST_UPDATE_DATE
    FROM FND_PROFILE_OPTIONS_VL FPO,
         FND_PROFILE_OPTION_VALUES FP,
         FND_RESPONSIBILITY_TL,
         FND_APPLICATION FA,
         FND_USER FL,
         FND_USER FU
    WHERE FPO.APPLICATION_ID = FP.APPLICATION_ID
         AND FPO.PROFILE_OPTION_ID = FP.PROFILE_OPTION_ID
         AND FP.LEVEL_VALUE = FL.USER_ID(+)
         AND FP.LEVEL_VALUE = RESPONSIBILITY_ID(+)
         AND FP.LEVEL_VALUE = FA.APPLICATION_ID(+)
         AND FU.USER_ID = FP.LAST_UPDATED_BY
         AND FP.PROFILE_OPTION_VALUE IS NOT NULL
         AND (UPPER (FP.Profile_Option_Value) LIKE UPPER ('%&1%')
              OR UPPER (FP.Profile_Option_Value) LIKE UPPER ('%&2%'))
    
        3
  •  0
  •   Jonathan    16 年前

    我掌握了哪些表需要获取(谢谢Sten)的知识,并进行了一些明智的编辑,因此我提出了一个满足我需要的查询:

    SELECT SUBSTR(e.profile_option_name,1,30) PROFILE,
        DECODE(a.level_id,10001,'Site',10002,'Application',10003,'Responsibility',10004,'User') L,
        DECODE(a.level_id,10001,'Site',10002,c.application_short_name,10003,b.responsibility_name,10004,d.user_name) LValue,
        NVL(a.profile_option_value,'Is Null') Value,
        SUBSTR(a.last_update_date,1,25) UPDATED_DATE
    FROM fnd_profile_option_values a
    INNER JOIN fnd_profile_options e ON a.profile_option_id = e.profile_option_id 
    LEFT OUTER JOIN fnd_responsibility_tl b ON a.level_value = b.responsibility_id
    LEFT OUTER JOIN fnd_application c ON a.level_value = c.application_id
    LEFT OUTER JOIN fnd_user d ON a.level_value = d.user_id
    WHERE e.profile_option_name LIKE '%&1%'
    ORDER BY profile_option_name;
    
        4
  •  0
  •   Christian Specht    13 年前
    SELECT SUBSTR(e.profile_option_name,1,30) PROFILE,
        DECODE(a.level_id,10001,'Site',10002,'Application',10003,'Responsibility',10004,'User') L,
        DECODE(a.level_id,10001,'Site',10002,c.application_short_name,10003,b.responsibility_name,10004,d.user_name) LValue,
        NVL(a.profile_option_value,'Is Null') Value,
        SUBSTR(a.last_update_date,1,25) UPDATED_DATE
    FROM fnd_profile_option_values a
    INNER JOIN fnd_profile_options e ON a.profile_option_id = e.profile_option_id 
    LEFT OUTER JOIN fnd_responsibility_tl b ON a.level_value = b.responsibility_id
    LEFT OUTER JOIN fnd_application c ON a.level_value = c.application_id
    LEFT OUTER JOIN fnd_user d ON a.level_value = d.user_id
    WHERE e.profile_option_name LIKE '%&1%'
    ORDER BY profile_option_name;