Header Ads

Latest posts
recent

How to unlock an user through code


It happens that for some reason you totally forget your password and entered it a number of times wrong hence locking your user account in Oracle E-Business Suite. As a result your user account gets the status Locked and you're unable to login.

There is a quick way of unlocking your user account again by reassigning a new password to your own username through code. You must have the correct permissions when connecting to the database so if you have for example the APPS credentials than you're good to go.

Connect with the EBS database using the APPS user and run the below code snippet to Unlock the user account. Of course change the values of the parameters username and newpassword to fit your needs.

DECLARE
    status BOOLEAN;
BEGIN
    status := FND_USER_PKG.CHANGEPASSWORD(username => 'CSCHAIK',
                                          newpassword => 'welcome123');

    IF status
    THEN
        DBMS_OUTPUT.PUT_LINE('Password changed and user unlocked');
        commit;
    ELSE
        DBMS_OUTPUT.PUT_LINE('Error while setting password');
    END IF;
END;

After running this code the user account becomes active again and can be used to login with the new password.

Powered by Blogger.