Wednesday 27 September 2023

Create User and Add Responsibility from backend

Adding new user in Oracle Apps (EBS) from back end

Application users in Oracle Apps (EBS) can be created from the front end as well as back end. The back end method for user creation can be used when you don’t have sysadmin access to the applciation or also it can be used to speed up the process when there are many userids to be created.

You will require apps access to connect to database  to run the package fnd_user_pkg.
fnd_user_pkg is the seeded generic API provided by Oracle.

Sample code to create a user (FND_USER) from backend and add responsibility.
DECLARE
v_user_name VARCHAR2 (100) := upper('&Enter_User_Name');
v_description VARCHAR2 (100) := 'Put Any description as like New User, etc..';
 v_app_short_name VARCHAR2 (100);
 v_resp_key VARCHAR2 (100);
 CURSOR user_cur IS
 select a.application_short_name, r.responsibility_key
 from fnd_responsibility_vl r, fnd_application_vl a where
 r.application_id =a.application_id
 and R.responsibility_ID IN (SELECT RESPONSIBILITY_ID FROM fnd_user_resp_groups WHERE USER_ID=&from_userid AND END_dATE IS NULL and a.application_short_name not in ('SQLAP','SQLGL','JTF','FND'));
user_rec user_cur%ROWTYPE;
BEGIN
 fnd_user_pkg.createuser
(x_user_name => v_user_name,
 x_owner => NULL,
 x_unencrypted_password => '&input_password',
 x_session_number => 0,
 x_start_date => SYSDATE,
 x_end_date => NULL,
 x_last_logon_date => NULL,
 x_description => v_description,
 x_password_date => NULL,
 x_password_accesses_left => NULL,
 x_password_lifespan_accesses => NULL,
 x_password_lifespan_days => NULL,
 x_employee_id => NULL,
 x_email_address => NULL,
 x_fax => NULL,
 x_customer_id => NULL,
 x_supplier_id => NULL,
 x_user_guid => NULL,
 x_change_source => NULL
 );
 COMMIT;
 OPEN user_cur;
 LOOP
 FETCH user_cur INTO user_rec;
 EXIT WHEN user_cur%NOTFOUND;
 fnd_user_pkg.addresp(username => v_user_name
 ,resp_app => user_rec.application_short_name
 ,resp_key => user_rec.responsibility_key
 ,security_group => 'STANDARD'
 ,description => NULL
 ,start_date => SYSDATE
 ,end_date => null);
 END LOOP;
 CLOSE user_cur;
commit;
END;
/

Wednesday 20 September 2023

How to increase oacore/jvm processes in R12.1.3

Below are the steps to increase oacore process:

STEP1: Take a backup of context file and opmn.xml file. 
a. $INST_TOP/ora/10.1.3/opmn/conf/opmn.xml
b. $CONTEXT_FILE

STEP2: Modify $CONTEXT_FILE as follows
From
<oacore_nprocs oa_var="s_oacore_nprocs">1</oacore_nprocs>
To
<oacore_nprocs oa_var="s_oacore_nprocs">2</oacore_nprocs>

STEP3: Modify $INST_TOP/ora/10.1.3/opmn/conf/opmn.xml as follows
$INST_TOP/ora/10.1.3/opmn/conf/opmn.xml file under oacore section as follows:
<process-type id="oacore" module-id="OC4J" status="enabled" working-dir="$ORACLE_HOME/j2ee/home">
From
<process-set id="default_group" numprocs="1"/>
To
<process-set id="default_group" numprocs="2"/>

STEP4:
Bounce Apache services, no need of autoconfig.  If your application services are already running, just reload the ocaore processes using adopmnctl.sh reaload command.
                                                        OR 
Bounce the Application services for safe side.

Identify versions of components in EBS

Useful commands to find the versions of various components used in Oracle E-Business Suite

Log in to the Application server and source the environment fine and execute the below command.

Find Apache Version in R12

$IAS_ORACLE_HOME/Apache/Apache/bin/httpd -v

Find Perl Version in EBS

$IAS_ORACLE_HOME/perl/bin/perl -v|grep built

Find Java Version/JDK Version

cd $ADMIN_SCRIPTS_HOME/
sh java.sh -version

Find JRE Version

cat $FORMS_WEB_CONFIG_FILE|grep sun_plugin_version

Find Weblogic Version

cat $FMW_HOME/wlserver_10.3/.product.properties | grep WLS_PRODUCT_VERSION

Find Opatch Version

$ORACLE_HOME/OPatch/opatch lsinventory

Oracle EBS version from the backend then connect to the database as user apps,

Find Oracle EBS Version

SQL>select release_name from apps.fnd_product_groups;

Find AD & TXK version in R12

SQL>select ABBREVIATION, NAME, codelevel FROM apps.AD_TRACKABLE_ENTITIES where abbreviation in ('txk','ad');

Find Workflow Version in R12

SQL>select text ,name from wf_resources where name like '%WF_VERSION%';

Oracle has provisioned bulit in scripts to collect versions of technology stack components. Reference – 601736.1

For Application Tier

perl $FND_TOP/patch/115/bin/TXKScript.pl 
-script=$FND_TOP/patch/115/bin/txkInventory.pl 
-txktop=$APPLTMP -contextfile=$CONTEXT_FILE 
-appspass=<apps password> 
-outfile=<File_Directory>/<output_file_name>

For Database Tier

$ADPERLPRG $ORACLE_HOME/appsutil/bin/TXKScript.pl
-script=$ORACLE_HOME/appsutil/bin/txkInventory.pl 
-txktop=$ORACLE_HOME/appsutil/temp
-contextfile=$CONTEXT_FILE
-appspass=<apps password>
-outfile=<File_Directory>/<output_file_name>