Sharing The Application Tier File System in Oracle EBS R12.0 & R12.1



Note: 
  • Use a local file system for the Instance Home for optimal performance.
  • All application tier nodes must be running the same operating system.
  • User ID and group ID should be consistent across all nodes.
  • Retain the same absolute path for the mount points of the shared file system on each node.
  • Value for the context variable "s_atName" must be same across all the application tier nodes.


The following R12 File System are shared on across the application tier node:

  • COMMON_TOP
  • APPL_TOP
  • OracleAS 10.1.2
  • OracleAS 10.1.3
  • OraInventory

Adding a Node to a Shared Application Tier File System:
1. Prepare existing node
$ cd $INST_TOP/admin/scripts/
$ perl adpreclone.pl appsTier

2. Make the Applications files accessible
Mount the shared file system disk to the Application node that you want to add so file system is visible from both the application nodes.

3. Configure the node to be added
$ cd $COMMON_TOP/clone/bin
$ perl adclonectx.pl addnode contextfile=<source_contextFile_from_primary>
--- This will create a new context file for the node in multi-node system.

$ perl $AD_TOP/bin/adconfig.pl contextfile=<specify_new_contextfile>
--- Run the AutoConfig utility on all the other nodes so that the required configuration files on those are updated with the new node information.

To Manage Personalization in Oracle R12

Note: Validate the steps in TEST before doing in PROD. The personalization level will impact the dependency document path


To Disable Personalization if system not allowing to login:
DECLARE
stat boolean;
BEGIN
dbms_output.disable;
dbms_output.enable(100000);
stat := FND_PROFILE.SAVE('FND_DISABLE_OA_CUSTOMIZATIONS', 'Y', 'SITE');
IF stat THEN
dbms_output.put_line( 'Stat = TRUE - profile updated' );
ELSE
dbms_output.put_line( 'Stat = FALSE - profile NOT updated' );
END IF;
commit;
END;


To find personalization from backend:
SELECT
    jp.path_docid,
    jdr_mds_internal.getdocumentname(jp.path_docid) personalization_path,
    jp.path_name,
    jp.path_owner_docid,
    jp.path_seq,
    jp.path_type,
    jp.path_xml_encoding,
    jp.path_xml_version,
    jp.created_by,
    jp.creation_date,
    jp.last_updated_by,
    jp.last_update_date
FROM
    apps.jdr_paths jp
WHERE
    jp.path_docid IN (
        SELECT DISTINCT
            comp_docid
        FROM
            jdr_components
        WHERE
            comp_seq = 0
            AND comp_element = 'customization'
            AND comp_id IS NULL)
--AND   upper(jdr_mds_internal.getdocumentname(jp.path_docid) ) LIKE upper('%HOMEPG%')
AND jp.creation_date > SYSDATE - 7;


List the Personalization:
set serveroutput on;
SQL> exec jdr_utils.listcustomizations('/oracle/apps/fnd/framework/navigate/webui/HomePG');

Output:
/oracle/apps/fnd/framework/navigate/webui/customizations/function/OAHOMEPAGE/HomePG
/oracle/apps/fnd/framework/navigate/webui/customizations/site/0/HomePG

Export The Personalization:
adjava -mx128m -nojit oracle.jrad.tools.xml.exporter.XMLExporter \
/oracle/apps/fnd/framework/navigate/webui/customizations/site/0/HomePG \
-username apps \
-password apps \
-dbconnection "(description=(address_list=(ADDRESS=(PROTOCOL=TCP)(HOST=test.orcl1.com)(PORT=1526)))(CONNECT_DATA=(SID=TEST)))" \
-rootdir /usr/tmp

Note: Output file will be saved in xml format in rootdir location
Example: /usr/tmp/oracle/apps/fnd/framework/navigate/webui/customizations/site/0/HomePG.xml


Delete the personalization document:
SQL> exec jdr_utils.deletedocument('/oracle/apps/fnd/framework/navigate/webui/customizations/site/0/HomePG);
SQL> commit;
Bounce Apache web server & Clear the Cache

Import The Personalization:
adjava -mx128m -nojit oracle.jrad.tools.xml.importer.XMLImporter \
/usr/tmp/oracle/apps/fnd/framework/navigate/webui/customizations/site/0/HomePG.xml \
-username apps \
-password apps \
-dbconnection "(description=(address_list=(ADDRESS=(PROTOCOL=TCP)(HOST=test.orcl1.com)(PORT=1526)))(CONNECT_DATA=(SID=TEST)))" \
-rootdir /usr/tmp 


Apache Tomcat Setup and SSL Configuration

OS: RHEL 6
Tomcat Version: 8.5

1. Set the environment

export JAVA_HOME=/u01/tmctv8/jdk/1.8.0_202
export CATALINA_HOME=/u01/tmctv8/tomcat8
export CATALINA_BASE=$CATALINA_HOME
export PATH=$JAVA_HOME/bin:$CATALINA_HOME/bin:$PATH

2. Edit the admin and roles credentials in tomcat-users.xml
$ vi /u01/tmctv8/tomcat8/conf/tomcat-users.xml
   <role rolename="manager-gui"/>
  <role rolename="admin-gui"/>
  <user username="admin" password="PASSWORD" roles="manager-gui,admin-gui"/>


3. Comment out the highlighted entries that is restricting access only localhost:
$ vi $CATALINA_HOME/webapps/host-manager/META-INF/context.xml
$ vi $CATALINA_HOME/webapps/manager/META-INF/context.xml

  <Valve className="org.apache.catalina.valves.RemoteAddrValve"

         allow="127\.\d+\.\d+\.\d+|::1|0:0:0:0:0:0:0:1" />

4. Edit SSL configuration in server.xml
Note: Request the ssl certificate in PKCS12 format and keystore password from the Certificate Authority (CA)
$ vi /u01/tmctv8/tomcat8/conf/server.xml
<Connector port="8445" protocol="HTTP/1.1" maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
keystoreFile="/u01/tmctv8/tomcat8/tomct_ssl/apache_ssl.pfx" keystorePass="" clientAuth="false" sslProtocol="TLS" keystoreType="PKCS12">

5. Restart the Apache Services:
$ ./shutdown.sh
$ ./startup.sh

6. Verify the Apache WebPage:
https://test.domain.com:8445



Personalize Login Page In R12.2

Custom login Page Background:

1. Create a file "custom-login.css" in $OA_HTML and add the below entry

body {
        height: 100%;
overflow: hidden;
        margin: 0;
        background-repeat: no-repeat;
        background-attachment: fixed;
background-position: center;
        background-image: url("/OA_HTML/media/bg.png");
        background-size: cover;
        font-size: 14px;
        font-family: serif;
     }

2. Place the background image file (bg.png) in OA_MEDIA 
3. Clear the browser cache the changes will be reflected. 


Custom Logo in Oracle E-Business Suite:

1. Copy the custom logo to $OA_MEDIA
2. Change Profile -- Corporate Branding Image for Oracle Applications with Custom logo name with Extension 


To Hide Sections (like Language, Register Here) in login Page:

Use Profile -- Local Login Hide Items

Example: 
FND_LOGIN_HIDE=#ForgotPasswordURL, #RegisterHereURL, #AccessibilityBox, #LanguagePickerBox, #CopyrightBox

Maintenance Scripts 01

### Note: Kindly Verify the scripts in TEST environment before using in PROD Instance
### Script to extract files changed last 1 Day
############ Script STARTS Here ##############
echo " "
echo " system_time $HOSTNAME "
echo "++++++++++++++++++++++++++++++"
date
echo "-----------------------------------------------------------"
echo " users currently logged in terminal "
echo "++++++++++++++++++++++++++++++++++++"
who
echo "-----------------------------------------------------------"
echo " File from OA_HTML "
echo "+++++++++++++++++++"
cd $OA_HTML
find . -type f -mtime -1 -ls
echo "-----------------------------------------------------------"
echo " file from common_top "
echo "++++++++++++++++++++++"
cd $COMMON_TOP
find . -type f -mtime -1 -ls
echo "-----------------------------------------------------------"
echo " files from appl_top "
echo "+++++++++++++++++++++"
cd $APPL_TOP
find . -type f -mtime -1 -ls
echo "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
############ Script ENDS Here ##############


### List File modified on Particular Date
find . -type f -newermt 2019-03-12 ! -newermt 2019-03-13 -ls
 

### List File modified from Specified Date
find . -type f -newermt 2019-03-12 -ls


### Script to compile invalid objects based on count
### It will spool the output for every run time
### Crontab Entry 
### */30 5-17 * * 0-4 $HOME/compile_object.sh > /dev/null 2>&1

############ Script STARTS Here ##############
. /u01/test/db_home/12.1.0/TEST_testdb.env

sqlplus -s / as sysdba <<EOF
set serveroutput on;
spool compile_object.log
DECLARE
invd_count NUMBER;
BEGIN
  SELECT COUNT(*) INTO invd_count FROM dba_objects WHERE status='INVALID';
IF invd_count > 0 THEN
  dbms_output.put_line ('Invalid Object Count is :'||invd_count );
  dbms_output.put_line ('LOOP Started' );
  execute immediate 'ALTER MATERIALIZED VIEW apps.XX_OBJECT_mv COMPILE';
  utl_recomp.recomp_parallel(2);
  dbms_output.put_line ('LOOP Ended' );
END IF;
 SELECT COUNT(*) INTO invd_count FROM dba_objects WHERE status='INVALID';
 dbms_output.put_line ('Invalid Object Count is :'||invd_count );
END;
/
spool off;
EOF
############ Script ENDS Here ##############



### Generate tar script for run filesystem

select 'tar -cvzf /u02/EBS_BKP/R122_PROD_'|| SUBSTR(SUBSTR(PATH,0,INSTR(PATH,'/inst',1)),-4,3)
|| TO_CHAR(SYSDATE, '_DD_MON_YYYY')
||'.tar.gz '||
SUBSTR(PATH,0,INSTR(PATH,'/inst',1))||'EBSapps' tar_cmd from fnd_oam_context_files
where
NAME NOT IN ('TEMPLATE','METADATA')
and CTX_TYPE='A'
and status='S'
and text like '%<file_edition_type oa_var="s_file_edition_type">run</file_edition_type>%';



### Update the password for EBS user from backend
declare
cursor c1 is
Select * from fnd_user where user_id=8774;
begin
for cr1 in c1 loop
BEGIN
  FND_USER_PKG.UPDATEUSER(x_user_name             => cr1.user_name
                         ,x_owner                 => NULL
                         ,x_unencrypted_password  => 'welcome'
                         ,x_password_date         => SYSDATE
                         );
END;
end loop;
end;
/
commit;


Script to Change Apps & Weblogic Password in R12.2

### Note: Kindly Verify the scripts in TEST environment before using in PROD Instance

### Script to change the APPS and Weblogic Password
########### Script STARTS Here ###############


read -s -p "Enter the SYSTEM password: " SYSTEM_PWD
echo $'\n'
read -s -p "Enter the Source APPS Password: " APPS_OLD_PWD
echo $'\n'
read -s -p "Provide NEW APPS Password: " APPS_NEW_PWD
echo $'\n'
read -s -p "Enter Source Weblogic Password: " WLS_PWD
echo $'\n'
read -s -p "Provide New Weblogic Password: " WLS_NEW_PWD

cd $ADMIN_SCRIPTS_HOME
sh adadminsrvctl.sh start <<EOF
$WLS_PWD
$APPS_OLD_PWD
EOF

FNDCPASS apps/$APPS_OLD_PWD 0 Y system/$SYSTEM_PWD SYSTEM APPLSYS $APPS_NEW_PWD

cd $FND_TOP/patch/115/bin
perl txkManageDBConnectionPool.pl -options=updateDSPassword -contextfile=$CONTEXT_FILE <<EOF
$WLS_PWD
$APPS_NEW_PWD
EOF


cd $ADMIN_SCRIPTS_HOME
sh adautocfg.sh <<EOF
$APPS_NEW_PWD
EOF


### Change the Weblogic Password
cd $FND_TOP/patch/115/bin
perl txkUpdateEBSDomain.pl -action=updateAdminPassword -contextfile=$CONTEXT_FILE <<EOF
Yes
$WLS_PWD
$WLS_NEW_PWD
$APPS_NEW_PWD
EOF

echo "---------------------------------------------"
echo "Apps & Weblogic Password Changed Successfully"
echo "---------------------------------------------"
########### Script ENDS Here ###############