ADPATCH Options
You can execute adpatch by logging in as the applications OS user and sourcing the appropriate environment file.
#su - applmgr
$cd PRODAPPL
$. ./APPSORA.env
$adpatch
Why we can not run two sessions of adpatch simultaneously ?
The adpatch utility creates the FND_INSTALL_PROCESSES and AD_DEFERRED_JOBS tables.So if these tables exist already, one won't be able to run a simultaneous patch application until one drop those.
By default adpatch does not take any clause, but there are some clauses that you could use with adpatch
Running a patch in test mode (apply=ny. The default is apply=y)
You can use the apply clause with adpatch to specify weather to run the patch in TEST mode or not, when you run the patch in test mode it does not do any changes but runs generates a log file with all the actions it would have performed.
Pre-install Mode (preinstall=ny. The default is preinstall=n )
This would be done normally during an upgrade or consolidated update. When a patch is applied in a preinstall mode the all the AD utilities are updated before the upgrade or update.
autoconfig (options=autoconfig noautoconfig. The default is autoconfig)
You can use this option when you do not wish to run autocinfig at the time of patching. This can be useful when applying a large number of patches when they are not merged.
Checkfile (options=nocheckfile checkfile. The default is checkfile)
you can use this option when you tell adpatch to check for already executed SQL
Compile Database (options=nocompiledb compiledb. The default is compiledb)
By defaulty autopatch compiles the invalid objects after the patch application, in case you wish not to do so you can specify options=nocompiledb
Compile JSP (options=nocompilejsp compilejsp. The default is compilejsp)
By defaulty autopatch compiles the java server pages (jsp) after the patch application, in case you wish not to do so you can specify options=nocompilejsp
Copy Portion (options=nocopyportion . The default is copyportion)
If you wish adpatch not to execute the commands present in the copy driver portion of the patch you can use the options=nocopyportion.
Database Portion (options=nodatabaseportion. The default is databaseportion)
If you wish adpatch not to execute the commands present in the database driver portion of the patch you can use the options=nodatabaseportion.
Generate Portion (options=nogenerateportion. The default is generateportion)
If you wish adpatch not to execute the commands present in the generate driver portion of the patch you can use the options=nogenerateportion
Maintenance Mode (options=hotpatch)
If you wish to apply a patch regardless of the system being in maintenance mode you can use options=hotpatch.
Integrity Check
If you wish to check the integrity of the patch you can use the options=integrity. Since metalink patches are pre checked for their integrity it is generally not required to do an explicit check and the default value is nointegrity.
Maintain MRC
You can use the maintainmrc option to specify weather you wish adpatch to execute the Maintain MRC schema as a part of the patch application or not. By default maintain MRC is done for standard patches and is disbaled for tarnslation and documentation patches.
$adpatch options=nomaintainmrc
Pre requisite Patch Check
If you wish adpatch not to check for pre requisite patches before application of the main patch you can use options=noprereq.By default pre requsite checking is enabled.
Validate Schemas
If you wish adpatch to explicitly validate all the registed schems by making a connection you can use options=validate. By default this validation is not performed.
$adpatch options=validate
Java Classes
If you wish adpatch not to copy new java classes from the patch you can use options=nojcopy.By default java classes are copied.
$adpatch options=nojcopy
Force Copy
By default adpatch copies the files without check the version of the existing files already present on the system.If you do not wish the newer version of the file to be replaced by the older version contained in the patch use options=noforcecopy.
$adpatch options=noforcecopy
Relinking
If you wish adpatch not do perform relinking you can use options=nolink.
$adpatch options=nolink
Generate Forms
If you wish adpatch not to generate the forms files you can specify options=nogenform.
$adpatch options=nogenform
Generate Reports
If you wish adpatch not to generate the report files you can specify options=nogenrep.
$adpatch options=nogenrep
You could specify multiple options at the command line using the , delimiter.
$adpatch options=hotpatch
FND_INSTALL_PROCESSES
The manager assigns each worker a unique ID and inserts a row for each worker in the FND_INSTALL_PROCESSES table. It creates this table to serve as a staging area for job information, and as a way to communicate with the worker. Communication is accomplished using two columns: CONTROL_CODE and STATUS. The manager updates the table with a subset of the list of jobs, one job per worker. For
example, if there are five workers, then the table holds five jobs (even though there may be 100 or more jobs involved in the complete action). The manager starts the workers and uses the CONTROL_CODE and STATUS columns to assign tasks. It polls these two columns continuously, looking for updates from the workers. As a worker finishes its assignment, the manager updates each row with the next task in the list, and leaves another message for the worker. Once all jobs are complete, the manager tells the workers to shut down, and then drops the FND_INSTALL_PROCESSES table (after it is sure all workers have actually shut down).
AD_DEFERRED_JOBS
The first time a job fails, the manager automatically defers the job and assigns a new one to the worker. If the deferred job fails the second time it is run, the manager defers it again only if the total runtime of the job is less than ten minutes. If the deferred job fails a third time (or if the job's total runtime is not less than ten minutes the second time it is run) the job stays at failed status and the worker waits. At this point, you must address the cause of the failure, and then restart the job.
The deferred job feature uses the AD_DEFERRED_JOBS table. This table is created when the FND_INSTALL_PROCESSES table is created, and is dropped when the FND_INSTALL_PROCESSES table is dropped.
How Patch Information Is Stored
AutoPatch stores patch information in the database automatically each time it successfully applies a patch. However, if the patch is not applied successfully, or when you run AutoPatch in pre-install mode, patch history is not written directly to the database, but instead is written to these patch information files:
• javaupdates<YYYYMMDDhhmiss>.txt, which contains information about changes to Java files
• adpsv<YYYYMMDDhhmiss>.txt, which contains information about changes to all files except Java files
Note: In the file name, hh is in 24-hour format.
Both files are located in the <APPL_TOP>/admin/<SID> directory. Each time you run AutoPatch, it checks this directory for the existence of the patch information files. If it finds them, it automatically uploads the information they contain to the patch history database. If the upload is successful, AutoPatch then deletes the files from the directory. The AutoPatch log file records whether the upload was successful or unsuccessful.