Tuesday, February 18, 2020

How to Unlock Users on Oracle EBS

BEGIN
FND_USER_PKG.EnableUser('G16259');
commit;
END;

BEGIN
FND_USER_PKG.DisableUser('G16259');
END;


--use to change password
DECLARE
    status BOOLEAN;
BEGIN
    status := FND_USER_PKG.CHANGEPASSWORD(username => 'G16259',newpassword => 'neknekmo');

    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;

-- use to indentify  locked accounts
SELECT
    FUSER.USER_NAME
    , PER.FULL_NAME
    , PER.EMPLOYEE_NUMBER
FROM
    APPLSYS.FND_USER FUSER
    , APPS.PER_PEOPLE_F PER
WHERE
    FUSER.EMPLOYEE_ID = PER.PERSON_ID(+)
    AND FUSER.ENCRYPTED_USER_PASSWORD = 'INVALID'
ORDER BY
    FUSER.USER_NAME


BEGIN
FND_USER_PKG.EnableUser(username => 'G16259',
                        start_date => sysdate,
                        end_date => sysdate+364);
commit;

END;

No comments:

Post a Comment