oracle erp日常运维,Oracle ERP 运维账号

该博客介绍了如何通过定制 Oracle 的 CUSTOM.pll 包装体,为特定用户(如 USER2)设置只读权限。当用户以这种身份登录时,他们可以访问指定的责任,但所有表单都会变为只读,无法提交并发程序。检查可以通过用户名或责任名称进行,以确保只读访问。这种方法有助于生产支持人员在不干扰生产数据的情况下进行问题排查。
摘要由CSDN通过智能技术生成

找到了,这个方案很好。

http://oraclemaniac.com/2011/08/21/read-only-oracle-apps-user/

Read Only Oracle Apps forms for a user/responsibility

Posted by Abhijit Ray ⋅ August 21, 2011⋅ 2 Comments

Filed Under  custom.pll, Read only, Responsibility, user

One of the challenges in all AMS projects is to view transactions and master data along with setups which have been done. Whenever an issue occurs production support personnel usually run some query in a read only schema in production instance to troubleshoot. In some cases this is inadequate and the support personnel have to ask the end user for screenshots. This can be avoided by adding a customization in CUSTOM.pll. Within the code an Oracle user needs to be specified. Once the support personnel logins with this user he/she will have access to all the responsibilities specified for the user but all forms will become read only. Also, the user will be unable to submit a concurrent program.The following has to be added to CUSTOM package body CUSTOM.pll.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758

procedure event(event_name varchar2) is--.....--......--...... formname VARCHAR2(100);blockname VARCHAR2(100); BEGIN-- Read onlyIF event_name = 'WHEN-NEW-FORM-INSTANCE'THENIF fnd_profile.VALUE ('USERNAME') = 'USER2'THENBEGINCOPY ('Entering app_form.query_only_mode.', 'global.frd_debug');COPY ('YES', 'PARAMETER.QUERY_ONLY'); app_menu2.set_prop ('FILE.SAVE', enabled, property_off);app_menu2.set_prop ('FILE.ACCEPT', enabled, property_off); formname := NAME_IN ('system.current_form');blockname := GET_FORM_PROPERTY (formname, First_Block); WHILE (blockname IS NOT NULL)LOOPIF (GET_BLOCK_PROPERTY (blockname, base_table) IS NOT NULL)THENSET_BLOCK_PROPERTY (blockname,insert_allowed,property_false); SET_BLOCK_PROPERTY (blockname,update_allowed,property_false); SET_BLOCK_PROPERTY (blockname,delete_allowed,property_false);END IF; blockname := GET_BLOCK_PROPERTY (blockname, nextblock); END LOOP; END query_only_mode; END IF; END IF; --...... other events ...........--............................... END event;.

The check, IF fnd_profile.VALUE (‘USERNAME’) = ‘USER2′, checks for user name USER2. The check can be done on responsibility level as well. Eg. IF UPPER(fnd_profile.VALUE (‘RESP_NAME’)) like ‘%READ%ONLY%’. In this case any responsibility which has the name Read Only within it, will become read only.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值