Sunday, October 4, 2009

Change User passwrd in oracle application

DECLARE
CURSOR c_users IS
SELECT user_name FROM fnd_user WHERE user_name = 'SUN';
v_user c_users%ROWTYPE;
v_success BOOLEAN;
BEGIN
OPEN c_users;
FETCH c_users
INTO v_user;
WHILE c_users%FOUND
LOOP
v_success := apps.fnd_user_pkg.changepassword(v_user.user_name,
'WELCOME123');
COMMIT;
IF v_success != TRUE
THEN
dbms_output.put_line('Failed to set password for user '
v_user.user_name);
END IF;
FETCH c_users
INTO v_user;
END LOOP;
CLOSE c_users;
COMMIT;
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
dbms_output.put_line('Error');
END;

No comments:

Post a Comment

Blog Archive