Home » Oracle » Oracle Ebuisness Suite » Script to Update a profile for Multiple Users in EBS

Script to Update a profile for Multiple Users in EBS

Many times, you might need to update a profile for multiple users. Changing through the form will be a tedious job, we can change using the plsql procedure from the backend. Here is an example to set the Apps Local Login Type to LOCAL for Multiple users

SET SERVEROUTPUT ON SIZE 1000000
DECLARE cursor user_cur is
select USER_ID from apps.fnd_user where user_name in ('username1','username2','username3');
v_success BOOLEAN;
l_user_name VARCHAR2(100);
BEGIN
FOR v_user_id IN user_cur
LOOP
select user_name into l_user_name from apps.fnd_user where user_id = v_user_id.user_id;
v_success := apps.FND_PROFILE.SAVE
( x_name => 'APPS_SSO_LOCAL_LOGIN',
x_value => 'LOCAL' ,
x_level_name => 'USER' ,
x_level_value => v_user_id.user_id ,
x_level_value_app_id => NULL ) ;
if v_success then
DBMS_OUTPUT.PUT_LINE('Employee with user name ' ||l_user_name ||' updated');
else
DBMS_OUTPUT.PUT_LINE('Failed to update Profile Option. Error:'||sqlerrm);
end if;
Commit;
END LOOP;
END;
/

The above plsql procedure needs to be run as apps database user. You can put your username in the cursor and then run it

See also  How to re-attach 12.2 E-Business Oracle Homes to the central inventory

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top