gpt4 book ai didi

oracle - get_release Oracle API 返回 "Unknown"结果而不是正确的版本

转载 作者:行者123 更新时间:2023-12-04 21:08:35 26 4
gpt4 key购买 nike

从应用程序用户执行以下 get_release 函数时,它返回了正确的版本: 12.1.3 ,但是当从另一个用户执行它时,它会返回 未知结果:

declare
l_release_name varchar2(30);
l_other_release_info varchar2(2000);
begin
if not apps.FND_RELEASE.get_release (l_release_name, l_other_release_info) then
null;
end if;
dbms_output.put_line(l_release_name);
end;

FND_RELEASE.get_release
是一个公共(public)包,应该没有限制从另一个用户调用它。

在我在函数注释中找到的内容下方:
-- get_release() will usually return TRUE
-- with RELEASE_NAME =
-- contents of RELEASE_NAME column in FND_PRODUCT_GROUPS
-- and OTHER_RELEASE_INFO = null
--
-- If FND_PRODUCT_GROUPS.RELEASE_NAME contains imbedded spaces:
--
-- get_release() will return TRUE
-- with RELEASE_NAME = FND_PRODUCT_GROUPS.RELEASE_NAME up to but
-- not including the first imbedded space
-- and OTHER_RELEASE_INFO = FND_PRODUCT_GROUPS.RELEASE_NAME
-- starting with the first non-space character after the first
-- imbedded space
--
-- On failure, get_release() returns FALSE. This will be a performance issue.
-- Both RELEASE_NAME and OTHER_RELEASE_INFO will be set to 'Unknown'.
-- This indicates that either:
-- 1) there are no rows in fnd_product_groups
-- - this can be resolved by populating the row and it will
-- be queried on the next call.
-- 2) there is more than one row in fnd_product_groups
-- - delete all but the one correct row from fnd_product_groups and it
-- will be queried on the next call. It's possible that the values
-- returned by release_* and *_version routines are still correct if
-- the first row in fnd_product_groups, ordered by product_group_id,
-- if the currect row, but this will still be a performance problem.

以前有人遇到过这个问题吗?!

最佳答案

据我所知有3种可能性:

  • FND_RELEASE 使用invoker_rights_clause ( AUTHID CURRENT_USER ) 编译。它为用户 apps 使用不同的来源和任何其他用户。
  • 函数 FND_RELEASE.get_release 使用 context访问。
  • 在您的系统中使用 private database选项。它能够重写查询并向当前用户添加条件。(第 2 点的变化,但隐含)
  • 关于oracle - get_release Oracle API 返回 "Unknown"结果而不是正确的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40053405/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com