What are the differences between Oracle Applications R12.1.x and R12.2.x

From DBA perspective, below are the changes in R12.2.x version of Oracle Applications, compared to R12.1.3.



1. Dual FS: Oracle Application Release 12.2 has dual filesystems(RUN FS and PATCH FS) to facilitate Online Patching.This Requires double the mountpoint space at MiddleTier Level.


2. Weblogic Server: Oracle HTTP Server in R12.1 is replaced by Oracle Weblogic Server.
10.1.3 Home is replaced by FMW_HOME.Weblogic Server Manages all oacore, forms and oafm servers in R12.2.

3. Online Patching : Dual Filesystem and EBR feature in 11gR2 Database facilitate online patching. Online Patching minimizes the downtime required for patching.adpatch utility in R12.1.x is replaced by adop utility. adop cycle runs in 5 Phases : prepare,apply,finalize,cutover and cleanup. adop internally calls adpatch utility to run the driver files associated with adop phases.

4. APPS Password Change: After Changing Apps Password in R12.2, we need to update the new password in EBS Datasource used by Weblogic Domain.To know more about apps password change in Oracle applications R12.2, check the below link.


5. Cloning : While Cloning of R12.2.x adcfgclone instance needs to be run twice,  on RUN fs and PATCH fs.From 12.2.5 Version (OR R12.AD-TXK Delta 7), we have the dualfs option which creates both run fs and patch fs during clone process.

ADOP Useful Options :skipsyncerror

There are Various options available with Oracle Applications Online Patching Utility (ADOP). Here , we will see the benefits of skipsyncerror option.


Scenario: 


Your Previous  adop session failed while applying patches and you did not find any solution to fix the errors, Oracle Support Provided a new patch to fix the issue. You will get errors while synchronization and need to ignore those errors.


Usage: adop phase=prepare skipsyncerror=yes




skipsyncerror Details


This option is used along with prepare phase.


Purpose:



This feature enables the user to specify that any synchronization errors in the prepare phase are expected to be fixed automatically in the synchronization that takes place with subsequent patches.



Values: yes/no



Default value is ‘no’. Set the value to ‘yes’ in order to work around synchronization failures that may occur when patches that failed to apply correctly in a previous patching cycle are synchronized during the prepare phase.



How to delete Managed Servers in R12.2

The procedure to increase/decrease the number of oacore/oafm servers in R12.2.X is different from R12.1.x.
Because in R12.2.x OPMN is replaced by Weblogic Server.

Steps to delete a managed Server in R12.2.x

1. Ensure there is no active adop cycle.

2. Shut down the managed server which needs to be deleted from the cluster/domain.

 $ADMIN_SCRIPTS_HOME/admanagedsrvctl.sh stop <MANAGED SERVER NAME>

Example:

$ADMIN_SCRIPTS_HOME/admanagedsrvctl.sh stop oacore_server5

3. Execute the script adProvisionEBS.pl  on the host where the managed server was created.

Source the RUN filesystem before running the command.

 perl $AD_TOP/patch/115/bin/adProvisionEBS.pl
ebs-delete-managedserver
-contextfile=<CONTEXT_FILE> -managedsrvname=<MANAGED_SERVER_NAME>
-servicetype=<SERVICE_TYPE> -logfile=<LOGFILE>

Sample Output:

bash-4.1$ perl $AD_TOP/patch/115/bin/adProvisionEBS.pl
> ebs-delete-managedserver
> -contextfile=$CONTEXT_FILE -managedsrvname=oacore_server6
> -servicetype=oacore -logfile=$APPLRGF/TXK/delMS_oacoreserver6.log

Enter the APPS Schema password:
Enter the WebLogic AdminServer password:

ManagedServer oacore_server5 deleted successfully.

The above command deletes the managed server and also updates related parameters in context file

To Verify the entries are deleted in Context File,check the output of below command

grep -i oacore_server6 $CONTEXT_FILE

4.Execute the following command to delete details of the managed server from the OHS configuration files mod_wl_ohs.conf and apps.conf

$ perl <FND_TOP>/patch/115/bin/txkSetAppsConf.pl
-contextfile=<CONTEXT_FILE>
-configoption=removeMS
-oacore=<host>.<domain>:<port>
-oafm=<host>.<domain>:<port>
-forms=<host>.<domain>:<port>
-formsc4ws=<host>.<domain>:<port>
-ekanban=<host>.<domain>:<port>
-accessgate=<host>.<domain>:<port>
-yms=<host>.<domain>:<port>

Sample Output:

bash-4.1$ perl $FND_TOP/patch/115/bin/txkSetAppsConf.pl
 -contextfile=$CONTEXT_FILE
-configoption=removeMS -oacore=localhost.localdomain.com:7205

*** LOG FILE:
/test12/applmgr/fs1/inst/apps/test12_localhost/logs/appl/rgf/TXK/txkSetAppsConf_08009354.log

5. Restart HTTP Server

cd $ADMIN_SCRIPTS_HOME

adapcctl.sh stop

adapcctl.sh start

6. Repeat the above steps on PATCH filesystem.

adpreclone.pl error while running copyBinary.sh on a 12.2 Environment

In a 12.2.5 environment adpreclone.pl errors out while running copyBinary.sh adpreclone.pl on appsTier

$perl adpreclone.pl appsTier

                     Copyright (c) 2011, 2014 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle E-Business Suite Rapid Clone

                                 Version 12.2

                      adpreclone Version 120.31.12020000.20

Enter the APPS User Password:
Enter the Weblogic AdminServer password :

 Checking the status of the Oracle WebLogic Administration Server….

 Running perl /test12/applmgr/fs1/EBSapps/appl/ad/12.0.0/patch/115/bin/adProvisionEBS.pl ebs-get-serverstatus -contextfile=/test12/applmgr/fs1/inst/apps/test12_vmohswrly128/appl/admin/test12_vmohswrly128.xml -servername=AdminServer -promptmsg=hide

The Oracle WebLogic Administration Server is up.

Running:
perl /test12/applmgr/fs1/EBSapps/appl/ad/12.0.0/bin/adclone.pl java=/test12/applmgr/fs1/EBSapps/comn/util/jdk64 mode=stage stage=/test12/applmgr/fs1/EBSapps/comn/clone component=appsTier method= appctx=/test12/applmgr/fs1/inst/apps/test12_vmohswrly128/appl/admin/test12_vmohswrly128.xml showProgress

 Setting the wls environment

Beginning application tier Stage – Thu Aug 18 02:43:26 2016

/test12/applmgr/fs1/EBSapps/comn/util/jdk64/bin/java -Xmx600M -DCONTEXT_VALIDATED=false -Doracle.installer.oui_loc=/oui -classpath /test12/applmgr/fs1/FMW_Home/webtier/lib/xmlparserv2.jar:/test12/applmgr/fs1/FMW_Home/webtier/jdbc/lib/ojdbc6.jar:/test12/applmgr/fs1/EBSapps/comn/java/classes:/test12/applmgr/fs1/FMW_Home/webtier/oui/jlib/OraInstaller.jar:/test12/applmgr/fs1/FMW_Home/webtier/oui/jlib/ewt3.jar:/test12/applmgr/fs1/FMW_Home/webtier/oui/jlib/share.jar:/test12/applmgr/fs1/FMW_Home/webtier/../Oracle_EBS-app1/oui/jlib/srvm.jar:/test12/applmgr/fs1/FMW_Home/webtier/jlib/ojmisc.jar:/test12/applmgr/fs1/FMW_Home/wlserver_10.3/server/lib/weblogic.jar:/test12/applmgr/fs1/FMW_Home/oracle_common/jlib/obfuscatepassword.jar  oracle.apps.ad.clone.StageAppsTier -e /test12/applmgr/fs1/inst/apps/test12_vmohswrly128/appl/admin/test12_vmohswrly128.xml -stage /test12/applmgr/fs1/EBSapps/comn/clone -tmp /tmp -method CUSTOM   -showProgress -nopromptmsg

Log file located at /test12/applmgr/fs1/inst/apps/test12_vmohswrly128/admin/log/clone/StageAppsTier_08180243.log

       20% completed
ERROR while running Stage…
Thu Aug 18 02:50:43 2016

ERROR while running perl /test12/applmgr/fs1/EBSapps/appl/ad/12.0.0/bin/adclone.pl java=/test12/applmgr/fs1/EBSapps/comn/util/jdk64 mode=stage stage=/test12/applmgr/fs1/EBSapps/comn/clone component=appsTier method= appctx=/test12/applmgr/fs1/inst/apps/test12_vmohswrly128/appl/admin/test12_vmohswrly128.xml showProgress …
Thu Aug 18 02:50:43 2016
[aptest12@vmohswrly128 <RUN> ]

adpreclone log files shows the below error message

Error Message:

START: Creating FMW archive.
Running /test12/applmgr/fs1/FMW_Home/oracle_common/bin/copyBinary.sh -javaHome /test12/applmgr/fs1/EBSapps/comn/clone/FMW/t2pjdk -al /test12/applmgr/fs1/EBSapps/comn/clone/FMW/FMW_Home.jar -smw /test12/applmgr/fs1/FMW_Home -ldl /test12/applmgr/fs1/inst/apps/test12_vmohswrly128/admin/log/clone/fmwT2PStage -invPtrLoc /etc/oraInst.loc -silent true -debug true
Script Executed in 298222 milliseconds, returning status 1
ERROR: Script failed, exit code 1

Solution:

1. set the environment variable T2P_JAVA_OPTIONS as given below

$export T2P_JAVA_OPTIONS=”-Djava.io.tmpdir=/test12/applmgr/temp”

2. Make sure enough free space is available in the temp directory provided above

3.Rerun adpreclone.pl on appsTier

ADOP Prepare Phase Fails with ORA-31011: XML parsing failed

While applying Patch on a test instance (R12.2.5), Prepare phase failed with error ORA-31011: XML parsing failed


Complete error message from adop logfile
==================================


[aptest12@localhost <RUN> ]$ adop phase=prepare


Enter the APPS password:
Enter the SYSTEM password:
Enter the WLSADMIN password:


Validating credentials.


Initializing.
    Run Edition context  : /test12/applmgr/fs2/inst/apps/test12_localhost/appl/admin/TEST12_localhost.xml
    Patch edition context: /test12/applmgr/fs1/inst/apps/test12_localhost/appl/admin/TEST12_localhost.xml
    Patch file system free space: 1130.34 GB


Validating system setup.
    [ERROR]     Failed to execute SQL statement:
select node_name from FND_OAM_CONTEXT_FILES
where NAME not in (‘TEMPLATE’,’METADATA’,’config.txt’) and
CTX_TYPE=’A’ and (status is null or upper(status) in (‘S’,’F’))
and EXTRACTVALUE(XMLType(TEXT),’//file_edition_type’) = ‘run’
and EXTRACTVALUE(XMLType(TEXT),’//oa_service_group_status[@oa_var=”s_web_admin_status”]’)=’enabled’
and EXTRACTVALUE(XMLType(TEXT),’//oa_service_list/oa_service[@type=”admin_server”]/oa_service_status’)=’enabled’


    [ERROR]     Error Message:
    [ERROR]     ORA-31011: XML parsing failed
    [ERROR]     ORA-19202: Error occurred in XML processing
    [ERROR]     LPX-00229: input source is empty
    [ERROR]     ORA-06512: at “SYS.XMLTYPE”, line 272
    [ERROR]     ORA-06512: at line 1 (DBD ERROR: error possibly near <*> indicator at char 208 in ‘    select node_name from FND_OAM_CONTEXT_FILES
    [ERROR]         where NAME not in (‘TEMPLATE’,’METADATA’,’config.txt’) and
    [ERROR]             CTX_TYPE=’A’ and (status is null or upper(status) in (‘S’,’F’))
    [ERROR]             and EXTRACTVALUE(<*>XMLType(TEXT),’//file_edition_type’) = ‘run’
    [ERROR]             and EXTRACTVALUE(XMLType(TEXT),’//oa_service_group_status[@oa_var=”s_web_admin_status”]’)=’enabled’
    [ERROR]             and EXTRACTVALUE(XMLType(TEXT),’//oa_service_list/oa_service[@type=”admin_server”]/oa_service_status’)=’enabled’
    [ERROR]     ‘)
    [UNEXPECTED]Error occurred identifying Admin server node




[STATEMENT] Please run adopscanlog utility, using the command


“adopscanlog -latest=yes”


to get the list of the log files along with snippet of the error message corresponding to each log file.




Cause:


fnd_oam_context_files table has incorrect information  or the table is corrupted




Solution:




1. Login to sqlplus as applsys and take backup of fnd_oam_context_files table.




SQL> conn applsys
Enter password:
Connected.
SQL> create table fnd_oam_context_files_bkp as select * from fnd_oam_context_files;


Table created.


2. Truncate Table fnd_oam_context_files


SQL>  truncate table fnd_oam_context_files;


Table truncated.




3. Bring down MT Services


4. Run Autoconfig to populate fnd_oam_context_files  with right information.


What Happens during adop cutover Phase?

Cutover Phase Requires a brief downtime.


Following activities occur during Cutover:


+Users are logged off the system
+Finalize is run as part of cutover -if not run earlier in adop cycle
+Cutover phase cancels ADZPPATCH Concurrent Program
+Stops all Services on RUN and PATCH editions , switches filesystem and starts services on new RUN FS
+Flipping snapshots in run and patch editions.
+Users are brought back online on the patched system 


Environment is changed after cutover. Need to Re-source the env, for performing any actions after cutover.


Syntax:


$ adop phase=cutover


Multi-node Considerations
========================
By default cutover is invoked automatically on remote nodes.
If you want cutover individually:      
1. First node the cutover should be:           
$ adop phase=cutover allnodes=no       
2. For all other nodes you should do:        
$ adop phase=cutover allnodes=no action=nodb           
 * nodb because db work is already done




Cutover Parameters:
===================


mtrestart :Specifies whether or not to start Mid-Tier services at end of cutover, it allows you to perform some additional maintenance operations in the system before bringing it up.        – Takes values “yes” or “no”.        – Default: yes
allnodes : Specifies whether or not to run on all the nodes.        – Takes values “yes” or “no”.        – Default: yes
action: Specifies whether or not to take database action        – Takes values “db” or “nodb”        – Default: db

Useful adop options and syntax

1.Using analytics parameter in adop apply phase




$ adop phase=apply analytics=yes


Specifying this option will cause adop to run the following scripts and generate the associated output files (reports):


ADZDCMPED.sql – This script is used to display the differences between the run and patch editions, including new and changed objects. The output file location is: /u01/R122_EBS/fs_ne/EBSapps/log/adop/<adop_sessionID>/<apply_directory>/<context_name>/adzdcmped.out.


ADZDSHOWED.sql – This script is used to display the editions in the system. The output file location is: /u01/R122_EBS/fs_ne/EBSapps/log/adop/<adop_sessionID>/<apply_directory>/<context_name>adzdshowed.out.


ADZDSHOWOBJS.sql – This script is used to display the summary of editioned objects per edition. The output file location is: /u01/R122_EBS/fs_ne/EBSapps/log/adop/<adop_sessionID>/<apply_directory>/<context_name>adzdshowobjs.out


ADZDSHOWSM.sql – This script is used to display the status report for the seed data manager. The output file location is: /u01/R122_EBS/fs_ne/EBSapps/log/adop/<adop_sessionID>/<apply_directory>/<context_name>adzdshowsm.out


Note: The analytics parameter should only be used when required, because of the extra processing needed.






2. flags=autoskip 

 e.g adop phase=apply patches=12345678  flags=autoskip 

 This option is an alternative for  “Continue as if it were successful”?  in adpatch, very useful in cases where patch failed to compile forms/reports and exiting.
 We need not restart the adop session just to compile a single forms (.fmb,.fmx) file.
 Make sure to review the autoskip.log logfile and fix the issues in autoskip log whenever you use autoskip flag in adop cycle.


3.  skipsyncerror=(yes|no)  [default: no]


 Specifies whether to ignore errors that may occur during incremental file system synchronization.  This might happen if you applied
 a patch in the previous patching cycle that had errors but decided to continue with the cutover.  When the patch is synchronized on
 the next patching cycle, the apply errors may occur again, but can be ignored.


4. wait_on_failed_job=(yes|no)  [default: no]


 Controls whether adop apply command exits when all workers have failed.  Instead of exiting, you can force adop to wait, and use the “adctrl” to retry failed jobs.

e.g adop phase=apply patches=7777 wait_on_failed_job=yes



5. Abort


The Online Patching Cycle can be aborted at any time prior to Cutover


e.g adop phase=abort


This is needed  if unrecoverable error happened or the user decides that patch is not needed.
If adop phase=apply failed, user should try abandon=yes first.
The abort command drops the database patch edition and  returns the system to normal runtime state.  Immediately following abort, you must also run a full cleanup and
fs_clone operation to fully remove effects of the failed online patching cycle.