EBS-使用fnd_user_pkg API 创建用户,添加职责,修改用户

If you have the Apps Password, its quite easy to create a FND_USER for yourself by using the API.
I find this script. very useful when development environment gets cloned from Production(that is when i do not have FND_USER in Production.
Please note that:-
1. You will be allocated System Administrator by this script. Hence you can assign whatever responsibilities that you desire latter, after logging in.
2. The password will be set to oracle
3. You need apps password to run this script. Alternately you need execute permission on fnd_user_pkg from the user where this script. will be run. If using some other user, please use apps.fnd_user_pkg.
4. You need to do a COMMIT after this script. has run. I have not included the commit within this script.
5. When running this script, you will be prompted to enter a user name.
 
--------Beging of script--------------
DECLARE ITPUB
  v_session_id INTEGER := userenv('sessionid');
  v_user_name  VARCHAR2(30) := upper('&Enter_User_Name');
BEGIN
 --Note, can be executed only when you have apps password.
-- Call the procedure to Creaet FND User
  fnd_user_pkg.createuser(x_user_name                  => v_user_name
 ,x_owner                      => ''
    ,x_unencrypted_password       => 'oracle'
    ,x_session_number             => v_session_id
   ,x_start_date                 => SYSDATE - 10
 ,x_end_date                   => SYSDATE + 100
    ,x_last_logon_date            => SYSDATE - 10
  ,x_description                => 'appstechnical.blogspot.com'
   ,x_password_date              => SYSDATE - 10
    ,x_password_accesses_left     => 10000 
    ,x_password_lifespan_accesses => 10000
    ,x_password_lifespan_days     => 10000
    ,x_employee_id                => 30 /*Change this id by running below SQL*/
     /* 
     SELECT person_id
           ,full_name
     FROM   per_all_people_f
 WHERE  upper(full_name) LIKE '%' || upper('full_name') || '%'
     GROUP  BY person_id
              ,full_name
     */
 ,x_email_address => 'appstechnical.blogspot@gmail.com'
,x_fax           => ''
    ,x_customer_id   => ''
    ,x_supplier_id   => '');
 fnd_user_pkg.addresp(username       => v_user_name
                      ,resp_app       => 'SYSADMIN'
                      ,resp_key       => 'SYSTEM_ADMINISTRATOR'
                    ,security_group => 'STANDARD'
                      ,description    => 'Auto Assignment'
                     ,start_date     => SYSDATE - 10
                     ,end_date       => SYSDATE + 1000);
END;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7306066/viewspace-705644/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7306066/viewspace-705644/

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值