Re: In Apps is there a way to lock out all users but a few for some YE updates

Hello,

we are currently working on a similar issue, since we are going live on a 
new PROD system and need to lock out all users other than a few SuperUsers 
who will do the test. This is what we came up with:

Disable users:
SET SERVEROUTPUT ON SIZE 1000000
SPOOL DISABLEUSERS.LOG

DECLARE
CURSOR C_USERS IS 
select USER_NAME, DESCRIPTION
from fnd_user
where end_date is null
and USER_NAME NOT IN ('SYSADMIN', 'USERNAME1', 'USERNAME2')
and (DESCRIPTION like '%RBA'
or DESCRIPTION like '%Temp')
order by USER_NAME;

BEGIN
  FOR V_USER IN C_USERS
  LOOP
    fnd_user_pkg.DisableUser (USERNAME=>V_USER.USER_NAME);
    INSERT INTO xxrba.xxrba_user(username, disable_date) 
VALUES(V_USER.USER_NAME, TRUNC(SYSDATE));
    DBMS_OUTPUT.PUT_LINE ('DISABLING USER: 
'||V_USER.USER_NAME||','||V_USER.DESCRIPTION);
  END LOOP;
  COMMIT;
EXCEPTION
  WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE (SQLERRM);
    ROLLBACK;
    RAISE;
END;
/



Enable users:
SET SERVEROUTPUT ON SIZE 1000000
SPOOL ENABLEUSERS.LOG

DECLARE
CURSOR C_USERS IS 
select USERNAME
from XXRBA.XXRBA_USER
order by USERNAME;
BEGIN
  FOR V_USER IN C_USERS
  LOOP
    fnd_user_pkg.EnableUser (USERNAME=>V_USER.USERNAME);
    UPDATE xxrba.xxrba_user SET ENABLE_DATE=TRUNC(SYSDATE) WHERE 
USERNAME=V_USER.USERNAME;
    DBMS_OUTPUT.PUT_LINE ('ENABLING USER: '||V_USER.USERNAME);
  END LOOP;
  COMMIT;
EXCEPTION
  WHEN OTHERS THEN
    DBMS_OUTPUT.PUT_LINE (SQLERRM);
    ROLLBACK;
    RAISE;
END;
/


Hope that helps,
Helmut





kathy duret <katpopins21@xxxxxxxxx> 
Sent by: ora-apps-dba-bounce@xxxxxxxxxxxxx
10/29/2008 11:20 AM
Please respond to
ora-apps-dba@xxxxxxxxxxxxx


To
ora-apps-dba@xxxxxxxxxxxxx
cc

Subject
In Apps is there a way to lock out all users but a few for some YE updates







The issue is that the new ?stub? calendar periods need to be added using 
dataloader.   
 
We need to lock out all but a few users during this time. 
 
Is there a way to do this easily? 
 
Thanks, 
 
Kathy 
 
 

Other related posts: