Similar to AutoInstall and adadmin. it compares the version numbers to ensure that your file will be replaced only with a newer one. 2 . • The patch driver file lists the files (and version numbers) included in the patch.rdf 110.21 Before replacing any file. • This file tells AutoPatch what steps need to be done to apply the patch and in what order to apply these steps. These include: Patch driver files • Every patch comes with one or more patch driver files. WHAT DOES A PATCH LOOK LIKE? A patch may consist of many files. Before AutoPatch replaces a file with one from the patch. When you receive a patch. AutoPatch can run parallel workers. Unless adpatch is run with forcecopy on the command line: Adpatch options=forcecopy Or if the patch driver specifies forcecopy as an action: Forcecopy po reports POXPOVPS. you actually receive a compressed archive (zip format) of several files. AutoPatch always makes a backup copy.WHAT IS ADPATCH? AutoPatch or AdPatch is a utility that is used to apply patches and release updates.

files are grouped by product. what files are to be changed. Within each patch. Scripts and executables • These are SQL scripts and executables that need to be run to apply that patch. each with its own naming convention: • c<bugno>.drv is the database driver. reports. or copy. • These scripts often modify the database and are typically called by the database driver. • Older software releases (10. • They are organized by subdirectory within the patch directory based on where they belong on your file system. • g<bugno>.drv is the file. • These are usually forms.drv is the generation driver. 3 . • They are organized by subdirectory within the patch directory but actually run from APPL_TOP. SQL scripts. not from where the patch was unloaded. Patch files are grouped by directory based on their patch number. • d<bugno>. "Replacement" files • These files are listed in the file driver (c<bugno>. then by their location in the <PROD>_TOP directory. or object modules. and runs SQL scripts and programs that update the database.drv for the file and generation portions and db<bugno>. A readme file • Every patch should come with a readme file. usually named readme. and g (for generation). • This file tells the user what bug it is fixing. d (for database). Note that the product version number is not included as a subdirectory.drv for the database driver. driver. responsible for copying files and linking executables.7 or older) used patch. and message files. and special steps the user needs to perform (if any).txt.drv). and generates forms. • The names were chosen because the order in which they must be applied is alphabetical: c (for copying). • These are files that replace the ones you have on your current system or add files that are not on your current system. reports.Three types of patch drivers.

drv A few notes about this example: • The directory name for this patch is the same as the bug number we are patching.rdf is located in the po/reports directory.drv.drv d123456. I receive a compressed tar archive. POXPOVPS. On the file system it is located in PO_TOP/reports directory. d123456.drv g123456. c123456.txt c123456.drv.For example.fmb | | sql driver | | b123456. • Note that within the patch.txt. suppose I have patch 123456. • The readme.drv are all at the top level of this patch.drv |_____________________________ | | | reports forms patch | | | POXPOCPS.rdf US 110 | |________ POXPOMPO. and g123456. which expands to this: 123456 | | | | | | po readme. which replaces a report file in PO and includes database update steps.sql d123456. 4 .

such as a C shell. you can add it using the command: $ PATH=$PATH:$ORACLE_HOME/bin. make sure you are in a Bourne or Korn shell.28/bin: /db02/webhome/v1103/bin:/usr/sbin:/usr/bin:/usr/ccs/bin: /usr/ucb:/dba/dbaprod:/usr/local/bin: /hrdev/cobol.BEFORE RUNNING ADPATCH There are a few steps to perform before you run AutoPatch.0. just type: $ echo $PATH ->/appl01/v1103/fnd/11.env • Depending on your setup. you may have already run this file when you logged in. Log in as applmgr. Run the environment file for the Oracle Applications product group you want to update.env • To run the environment file. • To check these variables. • At the UNIX prompt. Make sure this account is using a Bourne shell (or Korn shell on some platforms).28/bin:/appl01/v1103/ad/11.0. $APPL_TOP/<db_name>.solaris/cobol • Look for ORACLE_HOME/bin in the path. such as AdAdmin or AutoInstall. It may not work properly if you are using other shells. and type: $ . If it is not there. • This is normally <db_name>. "echo" them in UNIX: $ echo $TWO_TASK ->v1103 $ echo $ORACLE_HOME ->/db02/webhome/v1103 $ echo $ORACLE_SID ->atlcol06_v1103 4. 1. Verify that ORACLE_HOME and ORACLE_SID or TWO_TASK point to the correct database and directory. These are the same preparatory steps you would follow for running any other AD utility. export PATH 5 . 2.solaris/cobol/bin:/hrdev/cobol. 3. Ensure that your PATH is set correctly.

• You should have at least 50 MB in the temporary directories denoted by APPLTMP and REPORTS25_TEMP. 6 . In the meantime. 6. Copy the patch files to your own PATCH_TOP directory. if the patch is particularly large • Time requirements (a patch can take anywhere from 15 minutes to several hours to run) • Manual steps to run. This will include identifying what tiers a patch must be applied on. • The unzip program comes on the Applications Interoperability CD. or what Applications release you should have • Disk space requirements.txt file. 7. you will need to examine the patch contents to determine this. such as other patches you need to apply first. such as the location of the jre executable (from the Java Runtime Environment). 5. 8. You will need to unzip it. It provides information you'll need to run AutoPatch. Backup any previously patched files that you want to save. if any • Problems that are fixed in this patch + Note: Applications is moving toward a standard format for You should update adovars.env to include all non-database specific directories in your PATH. Read the readme. • You should also have space in the operating system’ default s temporary directory (usually /tmp or /usr/tmp).• Other directories need to be in your PATH as well. • The file will probably be in zip format. Ensure you have sufficient temporary disk space. That is the directory that holds the patch files. This information may include: • Software requirements.txt files.cdrom. or you can download it from http://www.

txt file.fmb0 9. and shut down the concurrent managers. you may need to run some SQL scripts manually. For example: Adrelink -> adrelink0 WSHSCOIF. Have all Oracle Applications users log out. Type "adpatch" at the command line. the existing one is overwritten. • On NT sharing violations can occur when a dynamic linked library is being accessed and at the same time being rebuild.0. • Adpatch resides under AD_TOP/bin. 10. • AutoPatch may update seed data and the database structure. 11. For example.28 NOTE: You may not use this utility for custom development unless you have written permission from Oracle Corporation 7 . California. Forms Servers and Web Servers.Before AutoPatch copies over a file.fmb -> WSHSCOIF. it backs up that file by renaming it to <filename>O. Copyright (c) 1998 Oracle Corporation Redwood Shores. If there is already a <filename>O file on the system. $ cd /d01/appl/110/patches/123456 $ adpatch • Run AutoPatch from the directory that holds the patch files (we refer to this as PATCH_TOP). Perform any preparation steps that are listed in the readme. so it's a good idea to make sure nothing is accessing the database during an AutoPatch session. USA Oracle Applications AutoPatch Version 11.

• You can exit AutoPatch by entering abort at any prompt. AutoPatch appends this session to the end of the log file and includes the line "Start of AutoPatch session" at the beginning of each session. Filename [adpatch. Answering questions in AutoPatch is similar to AutoInstall. Do you wish to activate this feature [Yes] ? You chose to be notified by email when a failure occurs. AutoPatch confirms your APPL_TOP is correct. Please enter the email id(s) (separated by space) that notifications should be sent to [applmgr] : Some SQL scripts perform row set processing.Enter your AutoPatch log file name or press [Return] to accept the default file name shown in brackets.rf9). • If a log file of the same name already exists. • Similar to AutoInstall.log] : You can receive an email message if AutoPatch encounters a failure. AutoPatch creates and uses restart files (ada*. • If you’ used AutoInstall before. Is this the correct APPL_TOP [Yes] ? AutoPatch asks for the name of the log file. • By default this is adpatch.RUNNING AUTOPATCH AutoPatch asks you some initial questions. • Pressing [Return] in answer to a question accepts the default answer in brackets. 8 . output and restart files are written under APPL_TOP. most of these questions look ve familiar to you. Typing "abort" exits immediately. You can be notified by email if a failure occurs. You can set the number of rows these scripts process. Your default directory is ’/d01/appl/110’. • AutoPatch log. AutoPatch records your AutoPatch session in a text file you specify.log.

you cannot install or upgrade the database from this $APPL_TOP.0. Enter the password for your ’SYSTEM’ ORACLE schema: manager 9 . AutoPatch asks for the SYSTEM password. you may not be able to perform certain tasks.5’. It then determines the username for your Application Object Library user. NOTE: If you do not have or choose not to have certain types of files installed in this APPL_TOP. you cannot relink concurrent programs or generate reports from this $APPL_TOP. You are about to use or modify Oracle Applications product tables in your ORACLE database ’apptest’ using ORACLE executables in ’/d01/oracle/prod/8. Example 1: If you don’t have files used for installing or upgrading the database installed in this area. Example 3: If you don’t have concurrent program files installed in this area. Do you currently have files used for installing or upgrading the database installed in this $APPL_TOP [Yes] ? Do you currently have Java and HTML files for Self-Service Applications installed in this APPL_TOP [Yes] ? Do you currently have Oracle Applications forms files installed in this $APPL_TOP [Yes] ? Do you currently have concurrent program files installed in this $APPL_TOP [Yes] ? AutoPatch asks you to confirm the database and database home directory. AutoPatch needs the password for your ’SYSTEM’ ORACLE schema in order to determine your installation configuration.Please enter the batchsize [1000] : AutoPatch asks what types of files you currently have. you cannot generate them or run them from this $APPL_TOP. exit AutoPatch (by typing ‘ ABORT’ ) and edit your ORACLE_HOME and ORACLE_SID or TWO_TASK variables as needed. Example 2: If you don’t have forms files installed in this area. Is this the correct database [Yes] ? • If these values are not correct.

• "compatible parallel yes" is the default for all patches. At this point. • This is usually c<bugno>. and asks you if you want to continue.drv. AutoPatch takes over. this is the directory from which you started AutoPatch. • AutoPatch displays messages to show its progress.drv.drv] : • AutoPatch tells you what patches you are about to apply. Please enter the name of your AutoPatch driver file [patch. what products they will change.. or g<bugno>. • The driver file may contain a line "compatible parallel no"..Connected successfully.. • By default. • Jobs are then run sequentially based upon the physical order in the database driver file. AutoPatch may have written informational messages to the file /d01/appl/110/admin/V1103/log/adpatch. d<bugno>.. If the patch is not required to be run serially you are prompted to enter the number of workers to use.lgi 10 . Enter the directory where your Oracle Applications patch has been unloaded The default directory is [d01/app1/110/patches123456] : AutoPatch asks for the name of your patch driver file. AutoPatch then validates the ORACLE usernames and passwords for Applications products.Connecting to SYSTEM.drv. • And at the end a success message is displayed. AutoPatch is complete.. Log and Info File sync point: Thu Apr 20 2000 10:29:13 Autopatch is exiting successfully. which disables the parallel feature. 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] : APPS AutoPatch asks for the directory that holds the patch files.

APPL_TOP is set to /d01/appl/110 Backing up restart files. if any….Done. If you don’ want to continue. If you want to continue. 11 .You should check the file /d01/appl/110/admin/V1103/log/adpatch. Your previous AutoPatch session did not run to completion. • Autopatch will ask several questions that have to be carefully answered. you answer with yes. 2. You can be notified by email if a failure occurs. •If you answer this question with Yes. you answer with No and the t following question will come up. Restarting a failed patch. Do you wish to continue with your previous AutoPatch session [Yes]? 1. adpatch asks and confirms the same things as in a regular run. you will continue with the old adpatch session as described above. Adpatch will ask you to confirm the database and database home directory. Is this the correct database [Yes] ? •After this question. [No] : •If you answer this question with No. Do you wish to activate this feature [Yes] ? •After this question. adpatch asks and confirms the same things as in a regular run. Enter No to continue with your previous AutoPatch session. You are about to apply a patch to the installation of Oracle Applications in your ORACLE database 'atlcol06_v1103' using ORACLE executables in '/db02/webhome/v1103'. you will continue with the following question.log for errors.

• You can run all the patch drivers on each tier. Restrict access to these files after you've confirmed the patch was successful. • Make all searches case insensitive • Look for "Error:" (with the colon) and not "Error" Re-run AutoPatch as necessary.lgi. adwork*. "Warning". • Log files are located in APPL_TOP/admin/<dbname>/log. and others).AFTER RUNNING AUTOPATCH There are a few post-AutoPatch steps to complete. If they don’ apply.log. After running AutoPatch.log. Perform manual update steps • Check your readme. • Most patches have multiple patch drivers (c. Clean up or read-protect log/. by default) as well as other files generated by AutoPatch (such as adrelink.log are no longer used. It may be easiest to protect access to the entire server. or at least the entire APPL_TOP directory. t nothing will happen.d and g). adpatch. restart/. output.log and adrepgen. "ORA-".log. "APP-". admvcode. and restart files record passwords to your Oracle Applications products. • You should check your main log file (adpatch.txt file for any manual update steps you might need to perform at this time. • Remember: In Release 11. 12 .log. • You may also need to run the patches on other servers in a multitier configuration. and "REP-". . Search for words like "Error:". you should check the log files for errors. and out/directories under the admin base directory. This contains messages on actions that AutoPatch did not perform. there is no need for Applications users to access these machines. • AutoPatch also produces an informational log file. • Log. + Note: The files adfrmgen. "PLS-". "FRM-".

Remove obsolete files • Once you're sure the patch works. you must run adadmin and choose the option(s) to maintain your MLS or MRC schema(s). • AutoPatch displays a reminder message at the end of the patch if it determines you are using either functionality. Some Applications DBA utilities may need this information later. you can delete backup copies of files (ones that end in O) to free up disk space. 13 . Maintain MLS or MRC Schema(s) • If using MLS or MRC functionality. • Do not delete applptch. This file is a history of all patches that have been applied.txt.

the patch driver files used in this example. line-by-line.0 d123456. In c123456.drv: begin ARU 123456DB compatible release 11.o pocfr.0 compatible parallel yes begin bug po 123456 begin actions sql po patch/110/sql b123456.0.1 wfrdflg.sql 110.sql none none &none sqlplus phase=dat end actions end bug po 123456 end ARU 123456DB 14 .drv 110.o POXCON In d123456.drv: begin aru bug_123456 characterset us7ascii begin bug po 123456 begin actions copy po patch/110/sql copy po patch/110/driver forcecopy po media libout po lib libin po lib link po bin end actions end bug po 123456 end aru bug_123456 b123456.PATCH DRIVER FILES Let's go over.gif pocfr.

And in g123456.rdf genform po forms/US POXPOMPO.drv: begin aru bug_123456 characterset us7ascii begin bug po 123456 begin actions genrep po reports POXPOVPS.fmb end actions end bug po 123456 end aru bug_123456 15 .

.0" indicates this patch is compatible with release 11.>. contains "&phase=" arguments which are used to determine the concurrency of the actions.."begin ARU 123456" .. The d<bugno. • There can only be one "begin ARU" .0. • In the c<bugno>.drv and g<bugno>. 16 . "end ARU 123456" indicates this patch corresponds to ARU request 123456.0.. however.drv files there is nothing to run in parallel.0. "begin bug po 123456" .0 will work with an Oracle Applications release of 11. "end bug po 123456" surround the bug patch to be applied. "compatible parallel yes" indicates that the database actions in the patch can be executed in a parallel manner. "begin actions" .. • As mentioned before.0. "end ARU" statement per patch driver file. a bug patch compatible with 11..0 (or higher).0.. "compatible release 11. "end actions" indicate the actions to be performed to apply this bug patch. and indicate what product it is for.drv file.

with version checking Run an executable program Copy a file. without version checking Generate a form Generate a PL/SQL library used by Applications forms Generate Oracle Forms menu file Generate a report Generate a PL/SQL library used by Applications reports Copy a module into a product library Extract a module out of a product library Relink an executable with Oracle8 Server Run a SQL script 17 .The following are actions that AutoPatch can perform: copy exec forcecopy genform genfpll genmenu genrep genrpll libin libout link sql Copy a file.

• Serial mode is no longer supported (i. • Universe logic (a special algorithm used in 10.txt is now stored under the admin base directory. one per product group. • You can now run multiple sessions of AutoPatch at the same time if you specify a different admin base directory for each.lgi).7 AutoPatch to avoid copying unnecessary files) is no longer used. 11. • AutoPatch writes version checking output to a separate file (adpatch.NEW FEATURES Just a few of the additions and differences in Release 11 AutoPatch.e.: choosing one worker still spawns a single worker process). 18 .7: • applptch.0 New Features: • AutoPatch displays a list of registered customized files affected by the patch. It used to be directly under APPL_TOP. Changes from 10.

Sign up to vote on this title
UsefulNot useful