Oracle FND - 用户API fnd_user_pkg的常用用法

一、创建用户

BEGIN
  fnd_user_pkg.createuser(x_user_name            => 'YUSUF'
                         ,x_owner                => fnd_user_pkg.null_char
                         ,x_unencrypted_password => 'mnb1234?'
                         ,x_start_date           => SYSDATE
                         ,x_end_date             => fnd_user_pkg.null_date);
  COMMIT;
END;

二、失效用户

BEGIN
  fnd_user_pkg.disableuser(username => 'YUSUF');
  COMMIT;
END;

三、更换用户密码

BEGIN
  fnd_user_pkg.updateuser(x_user_name            => 'YUSUF'
                         ,x_owner                => fnd_user_pkg.null_char
                         ,x_unencrypted_password => 'zxc1234?');
  COMMIT;
END;

四、分配职责

DECLARE
  l_resp_app VARCHAR2(50);
  l_resp_key VARCHAR2(30);
BEGIN
  SELECT a.application_short_name, v.responsibility_key
    INTO l_resp_app, l_resp_key
    FROM fnd_responsibility_vl v, fnd_application a
   WHERE v.application_id = a.application_id
     AND v.responsibility_name = '应用开发员';

  fnd_user_pkg.addresp(username       => 'YUSUF'
                      ,resp_app       => l_resp_app
                      ,resp_key       => l_resp_key
                      ,security_group => 'STANDARD'
                      ,description    => fnd_user_pkg.null_char
                      ,start_date     => SYSDATE
                      ,end_date       => fnd_user_pkg.null_date);
  COMMIT;
END;

五、失效已分配的职责

DECLARE
  l_resp_app VARCHAR2(50);
  l_resp_key VARCHAR2(30);
BEGIN
  SELECT a.application_short_name, v.responsibility_key
    INTO l_resp_app, l_resp_key
    FROM fnd_responsibility_vl v, fnd_application a
   WHERE v.application_id = a.application_id
     AND v.responsibility_name = '应用开发员';

  fnd_user_pkg.delresp(username       => 'YUSUF'
                      ,resp_app       => l_resp_app
                      ,resp_key       => l_resp_key
                      ,security_group => 'STANDARD');
  COMMIT;
END;

 

你可能感兴趣的:(Oracle学习笔记,Oracle,fnd_user_pkg)