Oracle EBS使用adpatch工具打patch過程(hotpatch mode)

從Metalink下載補丁

登陸到Metalink(https://support.oracle.com),Oracle內部用戶可以使用ARU來下載。

點擊Patches & Updates 頁籤,在"Patch Search"區,輸入你的Patch號,Search,

找到你的Patch之後,特別注意,需要仔細查看Patch的Release,Platform/Language...以及閱讀Read Me信息(看是否有需要關聯下載的Patch)

然後下載Patch到本機,


上傳&解壓

打patch前,最好備份可能會被覆蓋的文件。仔細閱讀Readme文件。

上傳patch文件到服務器端的Patch目錄下,然後使用unzip命令解壓,eg.

[oracle@bej301441 patches]$ unzip p10257769_R12.INV.B_R12_GENERIC.zip
Archive:  p10257769_R12.INV.B_R12_GENERIC.zip
  inflating: 10257769/README.html
  inflating: 10257769/u10257769.drv
  inflating: 10257769/f10257769.ldt
  inflating: 10257769/inv/patch/115/sql/INVVLTPB.pls
  inflating: 10257769/marker1.txt
  inflating: 10257769/b10257769.ldt
  inflating: 10257769/README.txt
  inflating: 10257769/patch_metadata.xml
  inflating: 10257769/ad/patch/115/manualsteps/ad_apply_patch.xml
[oracle@bej301441 patches]$

解壓後會生成一個patch目錄,進入patch目錄

[oracle@bej301441 patches]$ cd 10257769/

[oracle@bej301441 10257769]$ ls
ad             f10257769.ldt  marker1.txt         README.html  u10257769.drv
b10257769.ldt  inv            patch_metadata.xml  README.txt
[oracle@bej301441 10257769]$

u<patchnum>.drv文件是用於adpatch工具的drvier文件(Unified driver file),告訴adpatch需要拷貝哪些文件,需要產生哪些數據庫對象...

使用adpatch來打patch(完整的日誌)

adpatch實際上是位於$AD_TOP/bin目錄下的打patch工具,adpatch會對比補丁文件和系統原文件的版本,如果補丁文件的版本比系統裏原有的文件版本還低,那麼adpatch是不會複製patch文件到系統中去的。

對於本例,這裏使用hotpatch選項,hotpatch一般用於小的patch,對於大點的patch推薦使用Maintenance選項。

Maintainance模式打patch參考:http://blog.csdn.net/pan_tian/article/details/7872433

關於patch的選項,有很多,具體可以參見:Patch Application Utilities中“AutoPatch Options”部分。

[oracle@bej301441 10257769]$ adpatch driver=u10257769.drv options=hotpatch

                     Copyright (c) 2002 Oracle Corporation
                        Redwood Shores, California, USA

                         Oracle Applications AutoPatch

                                 Version 12.0.0

NOTE: You may not use this utility for custom development
      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 '/u01/oracle/mc3yd213/apps/apps_st/appl'.
Is this the correct APPL_TOP [Yes] ? yes  (需要你確實當前目錄爲APPL_TOP
)

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] : 10257769_EN_adpatch.log(指定adpatch輸出日誌的名字,一般放在$APPL_TOP/admin/<SID>/log下,默認名爲adpatch.log,不過最好改成補丁編號+語言.log)

Options = "hotpatch".
Patch Driver File = "u10257769.drv".

You can be notified by email if a failure occurs.
Do you wish to activate this feature [No] ? 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 [mc3yd213] : mc3yd213 *


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 [bej301441] : bej301441 *



You are about to apply a patch to the installation of Oracle Applications
in your ORACLE database 'mc3yd213'
using ORACLE executables in '/u01/oracle/mc3yd213/apps/tech_st/10.1.2'.

Is this the correct database [Yes] ? 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: (輸入數據庫system用戶的密碼

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 is verifying your username/password.
The status of various features in this run of AutoPatch is:

                                           <-Feature version in->
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 548205

Reading product information from file...

Reading language and territory information from file...

Reading language information from applUS.txt ...

AutoPatch warning:
 Product Data File
 /u01/oracle/mc3yd213/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
 /u01/oracle/mc3yd213/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
 /u01/oracle/mc3yd213/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.3]

Not checking the system maintenance mode.



Trying to obtain a lock...


  Attempting to instantiate the current-view snapshot...

  Was already instantiated. So no instantiation done this time.


     **************** S T A R T   O F   U P L O A D ****************

Start date: Wed Jul 04 2012 02:53:24



0 "left over" javaupdates.txt files uploaded to DB: Wed Jul 04 2012 02:53:24

0 patches uploaded from the ADPSV format patch history files: Wed Jul 04 2012 02:53:24


Uploading information about files copied during the previous runs ...

0 "left over" filescopied_<session_id>.txt files uploaded to DB: Wed Jul 04 2012 02:53:24

     ****************** E N D   O F   U P L O A D ******************


End date: Wed Jul 04 2012 02:53:24


Enter the directory where your Oracle Applications patch has been unloaded

The default directory is [/u02/patches/10257769] :


檢查patch是否打成功

Select * from ad_applied_patches where patch_name like '%10257769%';

如果有返回記錄說明Patch已經成功打上了。


adpatch的日誌文件

打完adpatch之後,在$APPL_TOP/admin/<SID>/log目錄下,會生成adpatch的日誌文件,默認名爲adpatch.log(可以在打patch的過程中,重新指定名稱),這個日誌記錄整個adpatch執行過程中的所有信息,如果打patch報錯或者失敗,可以查看這個文件。

補充:關於Oracle EBS Patch的類型

Standalone/Oneoff patches : This is used to define patch created to fix single/particular problem.


Mini Pack : This is group of oneoff patches for a particular product like INV, GL, AP and named like 11i.GL.E ( means this group of patches contain fix for 11i GL product (General Ledger till time E is released ) This is cummutative which means it will include 11i.GL.A, 11i.GL.B ….11iGL.D till 11i.GL.E earlier in 10.7 it used to called as patchset.


Family Pack : Group of mini packs in one family buldeled together is called as family pack. they are usually named as11i_PF.Few example of falilies are SCM ( 11i.SCM_PF.G ),ATG ( 11i.ATG_PF.H )_PF indicate Product Family Pack


Maintenance Pack : Group of family pack together is called as maintenance pack. So if you say your Verison is 11.5.10 then its maintenance pack 10 ( 3rd digit is maintenance pack )


Reference: 

Patch Application Utilities - http://docs.oracle.com/cd/E18727_01/doc.121/e12148/T531058T531062.htm

How To Apply Patches in E-Business Suite - http://blog.csdn.net/pan_tian/article/details/7514903

Oracle PATCHING : adpatch , Maintenance Mode - http://onlineappsdba.com/index.php/2008/01/23/patching/


轉載請註明出處:http://blog.csdn.net/pan_tian/article/details/7715942

======EOF======

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章