我们有一个在Oracle EBS上工作的解决方案,它处理Oracle EBS中的用户,以及与他们相关的角色和责任。我们过去常常从FND_USER
和其他相关表中获取数据。
我们创建了一个具有有限访问权限的用户,并创建了一个从FND_user表读取数据的同义词。
已经成功地创建了同义词,但是当我们使用:Select * from FND_USER
作为创建的用户登录获取数据时,我们将得到以下错误:
ORA- 00980 :同义词翻译不再有效。00000 -“同义词翻译不再有效”
在12.2.4
版本中,给予用户相同的权限,并且它工作得很好。
使用以下命令创建同义词:
CREATE OR REPLACE SYNONYM FND_USER for APPS.FND_USER;
我们已经创建了一个用户,并分配了一个包含不同权限的角色,如下所示
管理员权限1. Oracle包上的权限: Ans :包具有调用方权限。
create role ${new role};
create user ${new user} identified by ${password};
grant create session to ${new user};
grant create synonym to ${new user};
grant ${new role} to ${new user};
授予上述步骤中创建的新角色的权限(${新角色}):
grant select on APPS.FND_PRODUCT_GROUPS to ${new role};
grant select on APPS.FND_USER to ${new role};
grant select on SYS.DBA_USERS to ${new role};
grant select on APPS.FND_RESPONSIBILITY_VL to ${new role};
grant select on APPS.FND_APPLICATION_VL to ${new role};
grant select on APPS.FND_DATA_GROUPS to ${new role};
grant select on APPS.FND_USER_RESP_GROUPS_ALL to ${new role};
grant select on DUAL to ${new role};
grant select on APPS.PER_ALL_PEOPLE_F to ${new role};
grant select on APPS.RA_CUSTOMERS to ${new role};
grant select on APPS.FND_MENUS to ${new role};
grant select on APPS.FND_REQUEST_GROUPS to ${new role};
grant select on APPS.FND_APPLICATION to ${new role};
grant select on APPS.FND_DATA_GROUP_UNITS to ${new role};
grant select on APPS.FND_APPLICATION_TL to ${new role};
grant select on APPS.FND_RESPONSIBILITY to ${new role};
grant select on APPS.WF_ROLES to ${new role};
grant select on APPS.WF_USER_ROLES to ${new role};
grant select on APPS.WF_LOCAL_ROLES to ${new role};
grant select on APPS.WF_ALL_ROLES_VL to ${new role};
grant select on APPS.WF_ROLE_HIERARCHIES to ${new role};
grant select on APPS.FND_REQUEST_GROUP_UNITS to ${new role};
由于软件包具有调用权,我们将执行以下操作:
grant execute on APPS.SP_XXX to ${new role};
其中xxx包是FND_USER_PKG、FND_RESPONSIBILITY_PKG、WF_LOCAL_SYNCH、FND_WEB_SEC或FND_GLOBAL。
例如,将APPS.SP_FND_USER_PKG上的execute授予${new };
3.使用新用户名${new }登录并创建以下同义词:
create synonym FND_PRODUCT_GROUPS for APPS.FND_PRODUCT_GROUPS;
create synonym FND_USER for APPS.FND_USER;
create synonym DBA_USERS for SYS.DBA_USERS;
create synonym FND_RESPONSIBILITY_VL for APPS.FND_RESPONSIBILITY_VL;
create synonym FND_APPLICATION_VL for APPS.FND_APPLICATION_VL;
create synonym FND_DATA_GROUPS for APPS.FND_DATA_GROUPS;
create synonym FND_USER_RESP_GROUPS_ALL for APPS.FND_USER_RESP_GROUPS_ALL;
create synonym PER_ALL_PEOPLE_F for APPS.PER_ALL_PEOPLE_F;
create synonym RA_CUSTOMERS for APPS.RA_CUSTOMERS;
create synonym FND_MENUS for APPS.FND_MENUS;
create synonym FND_REQUEST_GROUPS for APPS.FND_REQUEST_GROUPS;
create synonym FND_APPLICATION for APPS.FND_APPLICATION;
create synonym FND_RESPONSIBILITY for APPS.FND_RESPONSIBILITY;
create synonym FND_APPLICATION_TL for APPS.FND_APPLICATION_TL;
create or replace synonym FND_DATA_GROUP_UNITS for
APPS.FND_DATA_GROUP_UNITS;
create or replace synonym WF_USER_ROLES for APPS.WF_USER_ROLES;
create or replace synonym WF_ROLES for APPS.WF_ROLES;
create or replace synonym WF_LOCAL_ROLES for APPS.WF_LOCAL_ROLES;
create or replace synonym WF_ROLE_HIERARCHIES for APPS.WF_ROLE_HIERARCHIES;
create or replace synonym WF_ALL_ROLES_VL for APPS.WF_ALL_ROLES_VL;
create synonym FND_REQUEST_GROUP_UNITS for APPS.FND_REQUEST_GROUP_UNITS;
·由于软件包具有调用权,我们将执行以下操作
create or replace synonym xxx for APPS.SP_XXX;
其中xxx包是FND_USER_PKG、FND_RESPONSIBILITY_PKG、WF_LOCAL_SYNCH、FND_WEB_SEC或FND_GLOBAL。
例如,
create or replace synonym FND_USER_PKG for APPS.SP_FND_USER_PKG;
发布于 2018-09-13 02:16:50
比为每个用户创建额外的同义词和您需要查询的EBS表更有效的方法是使用现有的应用程序同义词。这可以通过将默认模式切换到应用程序来实现,例如使用这样的登录触发器(用用户名apps_query替换您的应用程序)。
create or replace trigger apps.apps_query_logon_trg
after logon on apps_query.schema
begin
execute immediate 'alter session set current_schema=apps';
end;
/
https://stackoverflow.com/questions/52289398
复制相似问题