Technical‎ > ‎Scripts‎ > ‎

Script: Creating an Oracle e-business user from the command line


The following script helps with the creation of an oracle e-business user / fnd user from the command line. It also has code snippets that will let you add a responsibility and change password if required.


DECLARE

   l_user_id   NUMBER;

   result1     BOOLEAN;

BEGIN

   --CODE TO CREATE A NEW USER

   l_user_id    :=

      fnd_user_pkg.createuserid (x_user_name                 => 'USER1',

                                 x_owner                     => '',

                                 x_unencrypted_password      => 'welcome1',

                                 x_session_number            => 0,

                                 x_start_date                => SYSDATE

                                );            

   --CODE TO CHANGE PASSWORD OF A USER

   result1:= fnd_user_pkg.changepassword('USER1','welcome123'); 

   --CODE TO ADD A RESPONSIBILITY  

   fnd_user_pkg.addresp (username            => 'USER1',

                         resp_app            => 'SYSADMIN',

                         resp_key            => 'SYSTEM_ADMINISTRATOR',

                         security_group      => 'STANDARD',

                         description         => '',

                         start_date          => SYSDATE,

                         end_date            => NULL

                        );

   DBMS_OUTPUT.put_line (l_user_id);

END;



Free Hit Counters
Comments