Group Team

This article helps in changing the password for Oracle user using API FND_USER_PKG.CHANGEPASSWORD.

This API is tested in R12.1.3

DECLARE
   v_user_name          VARCHAR2 (100) := 'TEST_USER';
   v_new_password   VARCHAR2 (100) := :NEWPASSWORD;
   v_status                   BOOLEAN              := NULL;
BEGIN
   v_status := fnd_user_pkg.changepassword (v_user_name, v_new_password);

  COMMIT;
   DBMS_OUTPUT.put_line (   'Password is changed successfully for the user '
                         || v_user_name
                        );
EXCEPTION
   WHEN OTHERS
   THEN
      DBMS_OUTPUT.put_line
         (   'Error encountered while setting new password to the user and the error is '
          || SQLERRM
         );
END;

Output after executing the API:
Password is changed successfully for the user TEST_USER
Labels: , edit post
1 Response
  1. Brahim CHAIB Says:

    how can change this script so user will be asked to change his password


Post a Comment