EBS批量修改前台帐户密码

/*根据fnd_user表,建一张相同表结构的cux_fnd_user的客户化的表,然后把需要批量修改的表导入cux_fnd_user*/
declare
  l_ret boolean;

  cursor c_u is
    select fu.user_name user_name
      from cux_fnd_user fu
     where fu.ebs_user = 'Y'
     --and fu.user_num='8770129'
     ;
     l_pwd varchar2(25);
begin
  for rec in c_u loop
    l_pwd:= dbms_random.string('x', 25);/*生成随机的密码25位*/
    dbms_output.put_line('user_name:'||rec.user_name||',pwd:'||l_pwd);
    l_ret := fnd_user_pkg.ChangePassword(rec.user_name,l_pwd
                                        );
    if not l_ret then
      app_exception.raise_exception(exception_text => '修改用户' ||
                                                      rec.user_name ||
                                                      '密码错误' ||
                                                      cux_debug.get_error_stack);
    end if;
  end loop;
end;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值