Below are the steps to apply apps patch using ADpatch in oracle EBS R12.1.3. But before applying the patch please go through readme.txt file to understand how to, and all the high level steps in a better way.
SQL> select release_name from apps.fnd_product_groups;
RELEASE_NAME
12.1.3
STEP 1: Download and extract the patch from the Oracle support site.
I have downloaded the patch in /scratch/stage directory.
[oracle@orahowdb stage]$ ls -lrt p30311974*
-rw-r--r-- 1 gbuora dba 1067724 Oct 14 02:57 p30311974_R12.CDR.C_R12_GENERIC.zip
[oracle@orahowdb stage]$ unzip p30311974_R12.CDR.C_R12_GENERIC.zip
Must Read: How to Check Latest Patch Applied in Oracle Database
Rac Clusterware Startup Sequence in Detail
STEP 2: Set the environmental variables.
Set environment variables
[oracle@orahowdb stage]$ source /scratch/u01/E-BIZ/apps/apps_st/appl/APPSdm48sp_orh16fn.env
[oracle@orahowdb stage]$ which adadmin
/scratch/u01/E-BIZ/apps/apps_st/appl/ad/12.0.0/bin/adadmin
[oracle@orahowdb stage]$ which adpatch
/scratch/u01/E-BIZ/apps/apps_st/appl/ad/12.0.0/bin/adpatch
STEP 3: Check if patch is already applied or not and the count of valid and invalid objects.
SQL> select * from AD_BUGS where bug_number='30311974';
SQL> select count(*) from dba_objects where status='INVALID';
STEP 4: Stop the application. and check if application is completely stopped.
[oracle@orahowdb stage]$ cd $ADMIN_SCRIPTS_HOME
[oracle@orahowdb scripts]$ adstpall.sh apps/apps
[oracle@orahowdb scripts]$ ps -ef|grep /scratch/u01/E-BIZ
Note: /scratch/u01/E-BIZ is the apps installed directory.
STEP 5: Enable maintainance mode.
[oracle@orahowdb scripts]$ sqlplus apps/apps @/scratch/u01/E-BIZ/apps/apps_st/appl/ad/12.0.0/patch/115/sql/adsetmmd.sql ENABLE
STEP 6: Goto the unzipped patch directory and note down the drv file name.
[oracle@orahowdb stage]$ cd 30311974
[ oracle@orahowdb 30311974]$ ls -ltr *.drv
-rw-rw-r-- 1 gbuora dba 12001 Oct 11 10:03 u30311974.drv
STEP 7: execute adpatch command to apply the patch.
Below are the options which you need to enter during adpatch options.
Filename [adpatch.log] : u30311974.log ===just enter patch_num .log=====
Enter the password for your 'SYSTEM' ORACLE schema:xxx ==enter system password====
Enter the ORACLE password of Application Object Library [APPS] :xxx ===enter apps pss apps==
Please enter the name of your AutoPatch driver file : u30311974.drv ===enter .drv file name===
STEP 8: After patching disable the maintenance mode.
sqlplus apps/apps @/scratch/u01/E-BIZ/apps/apps_st/appl/ad/12.0.0/patch/115/sql/adsetmmd.sql DISABLE
STEP 9: Start the services.
cd $ADMIN_SCRIPTS_HOME
[oracle@orahowdb 30311974]$ echo $ADMIN_SCRIPTS_HOME
/scratch/u01/E-BIZ/inst/apps/dm48sp_orh16fn/admin/scripts
[ oracle@orahowdb scripts]$ adstrtal.sh apps/apps
STEP 10: Check the applied patch.
SQL> select * from AD_BUGS where bug_number=' 30311974';
Below are the applied adpatch logs for your reference.
[oracle@orahowdb 30311974]$ cd 30311974
[oracle@orahowdb 30311974]$ ls -ltr *.drv
-rw-rw-r-- 1 gbuora dba 12001 Oct 11 10:03 u30311974.drv
[ oracle@orahowdb 30311974]$ adpatch
Copyright (c) 2002 Oracle Corporation Redwood Shores, California,Oracle Applications AutoPatch USA
unless you have written permission from Oracle Corporation.
Attention: AutoPatch no longer checks for unapplied pre-requisite patches.
You must use OAM Patch Wizard for this feature. Alternatively, you can
review the README for pre-requisite information.
Your default directory is '/scratch/u01/E-BIZ/apps/apps_st/appl'.
Is this the correct APPL_TOP [Yes] ?
AutoPatch records your AutoPatch session in a text file
you specify. Enter your AutoPatch log file name or press [Return]
to accept the default file name shown in brackets.
Filename [adpatch.log] : u30311974.log
You can be notified by email if a failure occurs.
Do you wish to activate this feature [No] ?
Please enter the batchsize [1000] :
Please enter the name of the Oracle Applications System that this
APPL_TOP belongs to.
The Applications System name must be unique across all Oracle
Applications Systems at your site, must be from 1 to 30 characters
long, may only contain alphanumeric and underscore characters,
and must start with a letter.
Sample Applications System names are: "prod", "test", "demo" and
"Development_2".
Applications System Name [dm48sp] : dm48sp *
NOTE: If you do not currently have certain types of files installed
in this APPL_TOP, you may not be able to perform certain tasks.
Example 1: If you don't have files used for installing or upgrading
the database installed in this area, you cannot install or upgrade
the database from this APPL_TOP.
Example 2: If you don't have forms files installed in this area, you cannot
generate them or run them from this APPL_TOP.
Example 3: If you don't have concurrent program files installed in this area,
you cannot relink concurrent programs or generate reports from this APPL_TOP.
Do you currently have files used for installing or upgrading the database
installed in this APPL_TOP [YES] ? YES *
Do you currently have Java and HTML files for HTML-based functionality
installed in this APPL_TOP [YES] ? YES *
Do you currently have Oracle Applications forms files installed
in this APPL_TOP [YES] ? YES *
Do you currently have concurrent program files installed
in this APPL_TOP [YES] ? YES *
Please enter the name Oracle Applications will use to identify this APPL_TOP.
The APPL_TOP name you select must be unique within an Oracle Applications
System, must be from 1 to 30 characters long, may only contain
alphanumeric and underscore characters, and must start with a letter.
Sample APPL_TOP Names are: "prod_all", "demo3_forms2", and "forms1".
APPL_TOP Name [orh16fn] : orh16fn *
You are about to apply a patch to the installation of Oracle Applications
in your ORACLE database 'dm48sp'
using ORACLE executables in '/scratch/u01/E-BIZ/apps/tech_st/10.1.2'.
Is this the correct database [Yes] ?
AutoPatch needs the password for your 'SYSTEM' ORACLE schema
in order to determine your installation configuration.
Enter the password for your 'SYSTEM' ORACLE schema:xxxx
The ORACLE username specified below for Application Object Library
uniquely identifies your existing product group: APPLSYS
Enter the ORACLE password of Application Object Library [APPS] :xxxx
AutoPatch is verifying your username/password.
The status of various features in this run of AutoPatch is:
Feature Active? APPLTOP Data model Flags
------------------------------ ------- -------- ----------- -----------
CHECKFILE Yes 1 1 Y N N Y N Y
PREREQ Yes 6 6 Y N N Y N Y
CONCURRENT_SESSIONS No 2 2 Y Y N Y Y N
PATCH_TIMING Yes 2 2 Y N N Y N Y
PATCH_HIST_IN_DB Yes 6 6 Y N N Y N Y
SCHEMA_SWAP Yes 1 1 Y N N Y Y Y
JAVA_WORKER Yes 1 1 Y N N Y N Y
CODELEVEL Yes 1 1 Y N N Y N Y
Identifier for the current session is 30861
Reading product information from file…
Reading language and territory information from file…
Reading language information from applUS.txt …
AutoPatch warning:
Product Data File
/scratch/u01/E-BIZ/apps/apps_st/appl/admin/zfaprod.txt
does not exist for product "zfa".
This product is registered in the database but the
above file does not exist in APPL_TOP. The product
will be ignored without error.
AutoPatch warning:
Product Data File
/scratch/u01/E-BIZ/apps/apps_st/appl/admin/zsaprod.txt
does not exist for product "zsa".
This product is registered in the database but the
above file does not exist in APPL_TOP. The product
will be ignored without error.
AutoPatch warning:
Product Data File
/scratch/u01/E-BIZ/apps/apps_st/appl/admin/jtsprod.txt
does not exist for product "jts".
This product is registered in the database but the
above file does not exist in APPL_TOP. The product
will be ignored without error.
Reading database to see what industry is currently installed.
Reading FND_LANGUAGES to see what is currently installed.
Currently, the following language is installed:
Code Language Status
---- --------------------------------------- ---------
US American English Base
Your base language will be AMERICAN.
Setting up module information.
Reading database for information about the modules.
Saving module information.
Reading database for information about the products.
Reading database for information about how products depend on each other.
Reading topfile.txt …
Saving product information.
AD code level : [B.8]
Trying to obtain a lock…
Attempting to instantiate the current-view snapshot…
Was already instantiated. So no instantiation done this time.
Start date: Mon Oct 14 2019 04:22:42
0 "left over" javaupdates.txt files uploaded to DB: Mon Oct 14 2019 04:22:42
0 patches uploaded from the ADPSV format patch history files: Mon Oct 14 2019 04:22:42
0 patches uploaded from the ADPSV format preinstall patch history files: Mon Oct 14 2019 04:22:42
Uploading information about files copied during the previous runs …
0 "left over" filescopied_.txt files uploaded to DB: Mon Oct 14 2019 04:22:42
Enter the directory where your Oracle Applications patch has been unloaded
The default directory is [/scratch/stage/30311974] :
Please enter the name of your AutoPatch driver file : u30311974.drv
Getting Oracle Applications Release…
Current installed release is 12.1.3
Reading patch driver file…
Parsing and loading patch driver file…
212 lines processed.
Not checking patch integrity as integrity checking flag is turned off.
Successfully read patch driver file.
Determining target release…
Current target release is 12.1.3
Determining which bug fixes to apply…
Done determining which bug fixes to apply.
Log and Info File sync point:
Mon Oct 14 2019 04:23:08
Turning off actions that reference unrecognized products.
Log and Info File sync point:
Mon Oct 14 2019 04:23:08
End of unrecognized products checking.
AD utilities can support a maximum of 999 workers. Your
current database configuration supports a maximum of 73 workers.
Oracle recommends that you use between 4 and 8 workers.
Enter the number of parallel workers [4] :
AutoPatch will run in parallel mode.
Did not need to apply new applterr.txt.
Applying new applprod.txt (if any)…
Did not need to apply new applprod.txt.
Performing version checking for driver files…
Copying driver files into installation area…
No driver files were selected for copying.
Skipping…
ForceCopy driver files into installation area for Specified driver
since no such action is present for this driver file
Screening out files not valid for this installation…
Determining valid on-site files…
Skipping…
Determine forms to generate for Specified driver
since no such action is present for this driver file
Skipping…
Determine Oracle Reports libraries to generate for Specified driver
since no such action is present for this driver file
Skipping…
Determine reports to generate for Specified driver
since no such action is present for this driver file
Skipping…
Determine if need to generate message files for Specified driver
since no such action is present for this driver file
Looking for active bug fixes with no active actions…
Reading customized files list (if any)…
Did not find customized files registration file
"/scratch/u01/E-BIZ/apps/apps_st/appl/admin/applcust.txt"
The file may have been uploaded to the database.
This patch replaces the following customized files:
No customized files are replaced by this patch.
Copying files into installation area…
You are running admvcode
Header information is:
$Header: aiopatch.lc 120.7.12010000.2 2014/02/06 11:42:55 mkumandu ship $
Start of admvcode session
Date/Time is Mon Oct 14 2019 04:23:12
Filelist file is: /scratch/u01/E-BIZ/apps/apps_st/appl/admin/dm48sp/out/copymast.txt
Patch Character Set is: us7ascii
On-site Character Set is: UTF8
Log and Info File sync point:
Mon Oct 14 2019 04:23:12
Information about files copied to the APPL_TOP would be written to the
informational message file.
Character set 'US7ASCII' is a subset of character set 'UTF8'.
No character set conversion is required.
Copying files to APPL_TOP…
0 directories created.
33 files copied without character set conversion.
0 files copied with successful character set conversion.
33 files copied successfully.
0 files had fatal errors.
admvcode is exiting with status 0
End of admvcode session
Date/time is Mon Oct 14 2019 04:23:13
Done copying files into installation area.
Skipping…
ForceCopy files into installation area for Specified driver
since no such action is present for this driver file
Skipping…
Archive object modules into product libraries for Specified driver
since no such action is present for this driver file
Skipping…
Create Directories for Specified driver
since no such action is present for this driver file
Skipping…
Relink for Specified driver
since no such action is present for this driver file
Performing second half of mirrored copies…
No mirrored copies were executed in this patch.
Updating Oracle Applications Java files if necessary…
No Oracle Applications Java files required updates.
Checking to see if any files possibly included in the product JAR files
were copied by this patch…
Running AutoConfig to instantiate templates which affect
the generation of JAR files since none of these templates
were patched during this run of adpatch.
No product JAR files need to be re-generated.
Checking to see if adjborg.txt or any files included in
adjborg.txt were copied by this patch…
Neither adjborg.txt nor any file included in
Getting list of invalid objects in APPS schema.
Invalid object reports are recorded in
/scratch/u01/E-BIZ/apps/apps_st/appl/admin/dm48sp/log/30861_preenv.*
Running SQL and EXEC commands in parallel…
Creating the AD_UTIL_PARAMS table…
Table AD_UTIL_PARAMS already exists, so dropping the table and recreating it.
Creating FND_INSTALL_PROCESSES table…
* Start of AD Worker session *
AD Worker version: 12.0.0
AD Worker started at: Mon Oct 14 2019 04:23:17
APPL_TOP is set to /scratch/u01/E-BIZ/apps/apps_st/appl
Worker process 3 started.
* Start of AD Worker session *
AD Worker version: 12.0.0
AD Worker started at: Mon Oct 14 2019 04:23:17
APPL_TOP is set to /scratch/u01/E-BIZ/apps/apps_st/appl
Worker process 4 started.
Checking if all jobs have their actual and symbolic arguments in sync….
Done.
Reading jobs from FND_INSTALL_PROCESSES table …
* Start of AD Worker session *
AD Worker version: 12.0.0
AD Worker started at: Mon Oct 14 2019 04:23:17
APPL_TOP is set to /scratch/u01/E-BIZ/apps/apps_st/appl
Done reading jobs from FND_INSTALL_PROCESSES table …
Telling workers to read 'todo' restart file.
* Start of AD Worker session *
AD Worker version: 12.0.0
AD Worker started at: Mon Oct 14 2019 04:23:17
APPL_TOP is set to /scratch/u01/E-BIZ/apps/apps_st/appl
Done.
Starting phase 0 (A0): con
There are now 35 jobs remaining (current phase=A0):
0 running, 1 ready to run and 34 waiting.
Assigned: file cdr_stop_jobq.sql on worker 1 for product cdr username CDR.
Completed: file cdr_stop_jobq.sql on worker 1 for product cdr username CDR.
Starting phase 1 (A1): tab
There are now 34 jobs remaining (current phase=A1):
0 running, 1 ready to run and 33 waiting.
Assigned: file DME_OPOBJ_CONTEXT_MAP_TMP.xdf on worker 1 for product cdr username APPS.
Completed: file DME_OPOBJ_CONTEXT_MAP_TMP.xdf on worker 1 for product cdr username APPS.
Starting phase 2 (A2): tab+2
There are now 33 jobs remaining (current phase=A2):
0 running, 1 ready to run and 32 waiting.
Assigned: file dme2484partitionindex.sql on worker 1 for product cdr username CDR.
Completed: file dme2484partitionindex.sql on worker 1 for product cdr username CDR.
Starting phase 3 (A3): tbm: Create Large Indexes
There are now 32 jobs remaining (current phase=A3):
0 running, 1 ready to run and 31 waiting.
Assigned: file DME_OPOBJ_CONTEXT_MAP_TMP.xdf on worker 1 for product cdr username APPS.
Completed: file DME_OPOBJ_CONTEXT_MAP_TMP.xdf on worker 1 for product cdr username APPS.
Starting phase 4 (A4): os
There are now 31 jobs remaining (current phase=A4):
0 running, 1 ready to run and 30 waiting.
Assigned: file cdrpubsynonym.sql on worker 1 for product cdr username CDR.
Completed: file cdrpubsynonym.sql on worker 1 for product cdr username CDR.
Starting phase 5 (A5): pls
There are now 30 jobs remaining (current phase=A5):
0 running, 5 ready to run and 25 waiting.
There are now 25 jobs remaining (current phase=A6):
0 running, 22 ready to run and 3 waiting.
4 running, 10 ready to run and 3 waiting.
Starting phase 7 (A7): upg
There are now 3 jobs remaining (current phase=A7):
0 running, 1 ready to run and 2 waiting.
Assigned: file dmeschexpval.sql on worker 1 for product cdr username CDR.
Completed: file dmeschexpval.sql on worker 1 for product cdr username CDR.
Starting phase 8 (A8): en+1
There are now 2 jobs remaining (current phase=A8):
0 running, 1 ready to run and 1 waiting.
Assigned: file cdr_start_jobq.sql on worker 1 for product cdr username CDR.
Completed: file cdr_start_jobq.sql on worker 1 for product cdr username CDR.
Starting phase 9 (A9): last
There are now 1 jobs remaining (current phase=A9):
0 running, 1 ready to run and 0 waiting.
Assigned: file cdrdmwbld248.ldt on worker 1 for product cdr username APPS.
Program completed successfully
Completed: file cdrdmwbld248.ldt on worker 1 for product cdr username APPS.
Telling workers to quit…
All workers have quit.
Dropping FND_INSTALL_PROCESSES table…
FND_INSTALL_PROCESSES table dropped.
Dropping AD_DEFERRED_JOBS table…
AD_DEFERRED_JOBS table dropped.
Done running SQL and EXEC commands in parallel.
Running Invoker's Rights Maintenance…
Creating the AD_UTIL_PARAMS table…
Table AD_UTIL_PARAMS already exists, so dropping the table and recreating it.
Creating FND_INSTALL_PROCESSES table…
Setting parallel context: Invoker's Rights processing at R120
Need to perform Invoker's Rights processing
Making job list for APPLSYS/*
Writing dependencies of jobs to run to appldep.txt file…
There are now 10 jobs remaining (current phase=A0):
0 running, 1 ready to run and 9 waiting.
Reading completed jobs from restart file (if any).
There are now 10 jobs remaining (current phase=A0):
0 running, 1 ready to run and 9 waiting.
Determining which java executables are supported by adJavaWorker…
Starting worker processes.
Worker process 1 started.
Worker process 2 started.
* Start of AD Worker session *
AD Worker version: 12.0.0
AD Worker started at: Mon Oct 14 2019 04:28:00
APPL_TOP is set to /scratch/u01/E-BIZ/apps/apps_st/appl
Worker process 3 started.
* Start of AD Worker session *
AD Worker version: 12.0.0
AD Worker started at: Mon Oct 14 2019 04:28:00
APPL_TOP is set to /scratch/u01/E-BIZ/apps/apps_st/appl
Worker process 4 started.
Checking if all jobs have their actual and symbolic arguments in sync….
Done.
Reading jobs from FND_INSTALL_PROCESSES table …
* Start of AD Worker session *
AD Worker version: 12.0.0
AD Worker started at: Mon Oct 14 2019 04:28:00
APPL_TOP is set to /scratch/u01/E-BIZ/apps/apps_st/appl
* Start of AD Worker session *
AD Worker version: 12.0.0
AD Worker started at: Mon Oct 14 2019 04:28:00
APPL_TOP is set to /scratch/u01/E-BIZ/apps/apps_st/appl
Done reading jobs from FND_INSTALL_PROCESSES table …
Telling workers to read 'todo' restart file.
Done.
Starting phase 0 (A0): invoker
There are now 10 jobs remaining (current phase=A0):
0 running, 1 ready to run and 9 waiting.
Assigned: file adinvset.pls on worker 1 for product ad username APPLSYS.
Completed: file adinvset.pls on worker 1 for product ad username APPLSYS.
Starting phase 1 (A1): invoker+1
There are now 9 jobs remaining (current phase=A1):
0 running, 4 ready to run and 5 waiting.
There are now 5 jobs remaining (current phase=A2):
0 running, 4 ready to run and 1 waiting.
There are now 1 jobs remaining (current phase=A3):
0 running, 1 ready to run and 0 waiting.
Assigned: file adinvcln.pls on worker 1 for product ad username APPLSYS.
Completed: file adinvcln.pls on worker 1 for product ad username APPLSYS.
Done with Invoker's Rights processing.
Telling workers to quit…
All workers have quit.
Dropping FND_INSTALL_PROCESSES table…
FND_INSTALL_PROCESSES table dropped.
Dropping AD_DEFERRED_JOBS table…
AD_DEFERRED_JOBS table dropped.
Updating the checkfile repository if necessary…
Processing the last batch…
Done updating the checkfile repository…
Dropping AD_TABLE_INDEX_INFO table…
AD_TABLE_INDEX_INFO table dropped.
Done running SQL scripts and EXEC commands.
Compiling invalid objects…
sqlplus -s APPS/ @/scratch/u01/E-BIZ/apps/apps_st/appl/ad/12.0.0/sql/adutlrcmp.sql APPLSYS APPS 4 0 NONE FALSE
sqlplus -s APPS/ @/scratch/u01/E-BIZ/apps/apps_st/appl/ad/12.0.0/sql/adutlrcmp.sql APPLSYS APPS 4 0 NONE FALSE
Number of invalid objects: 2
Getting list of invalid objects in APPS schema.
Invalid object reports are recorded in
/scratch/u01/E-BIZ/apps/apps_st/appl/admin/dm48sp/log/30861_postenv.*
Skipping…
Generate forms library files for Specified driver
since no such action is present for this driver file
Skipping…
Generate forms menu files for Specified driver
since no such action is present for this driver file
Skipping…
Generate forms for Specified driver
since no such action is present for this driver file
Skipping…
Generate reports libraries for Specified driver
since no such action is present for this driver file
Skipping…
Generate reports for Specified driver
since no such action is present for this driver file
Skipping…
Generate Messages for Specified driver
since no such action is present for this driver file
Skipping…
Generate Workflow resource files for Specified driver
since no such action is present for this driver file
Skipping …
Running AutoConfig since none of its templates were
patched during this run of adpatch.
Saving Patch History information to Database…
Trying to obtain a lock…
Inserted 1 patch history records (total).
Gathering Statistics for AD_PATCH_HIST_TEMP
Done Gathering Statistics for AD_PATCH_HIST_TEMP
Inserted 1 bug history records for this patch (total).
Inserted 2 action history records for this bug (total).
Gathering Statistics for AD_PATCH_HIST_TEMP
Done Gathering Statistics for AD_PATCH_HIST_TEMP
Inserted 1 bug history records for this patch (total).
Inserted 2 action history records for this bug (total).
Updating the current-view snapshot…
Done saving Patch History information.
About to do IREP processing…
Attempting to process IREP files …
Successfully processed IREP files.
Done IREP processing.
Copying applprod.tmp to applprod.txt (if needed)…
Did not need to copy applprod.tmp to applprod.txt.
Copying admin//applterr.txt to admin/applterr.txt (if needed)…
Did not need to copy admin/dm48sp/applterr.txt to admin/applterr.txt.
sqlplus -s APPS/* @/scratch/u01/E-BIZ/apps/apps_st/appl/ad/12.0.0/sql/adtimrpt.sql 30861 adt30861
A job timing report has been generated for the current session.
You should check the file
/scratch/u01/E-BIZ/apps/apps_st/appl/admin/dm48sp/out/adt30861.lst
for details.
Purging timing information for prior sessions.
sqlplus -s APPS/* @/scratch/u01/E-BIZ/apps/apps_st/appl/ad/12.0.0/sql/adtpurge.sql 10 1000
Done purging timing information for prior sessions.
AutoPatch is complete.
AutoPatch may have written informational messages to the file
/scratch/u01/E-BIZ/apps/apps_st/appl/admin/dm48sp/log/u30311974.lgi
Errors and warnings are listed in the log file
/scratch/u01/E-BIZ/apps/apps_st/appl/admin/dm48sp/log/u30311974.log
and in other log files in the same directory.