Table of Contents 1. 기존 OPatch 유틸리티 디렉토리 내용 삭제 2. OPatch 유틸리티 압축 해제 3. OPatch version 적용 4. Oracle Inventory 확인 5. EM 중지 6. OCM response 파일 생성 7. Bundle Patch 압축해제 8. Bundle Patch 적용 9. 변경된 SQL Files DB에 적용 10. 적용 확인 Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 1 / 17 - OPatch & Bundle Patch Files OPatch file name – p6880880_112000_Linux-x86-64.zip version – 11.2.0.3.4 Bundle Patch file name – p14727347_112030_Linux-x86-64_BP5 version – 11.2.0.3.5 Directory Location /u01/media/ - PATCH 정보 Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 2 / 17 - OPatch README.txt Contents Summary ------- This is the README file for OPatch 11.2.0.3.4, the Oracle Interim One-off Patch Installer. This patch (6880880) installs the "OPatch" utility. OPatch is used for patching Oracle software. If you have an older version of opatch it is strongly recommended to back it up before upgrading to the new OPatch. OPatch is Oracle's only supported method of installing interim patches. It updates the central and per-product inventories with the details of the patch. OPatch 11.2.0.3.4 can only be used for OUI based Oracle Homes. The OUI version must be 11.2.*. How to install the utility: --------------------------- To install this patch, Please extract the file "zipped file" using unzip or winzip, depending upon the platform. You should extract the zip file directly under the ORACLE_HOME. Please follow the following steps for extracting the zip file of OPatch. (1) Please take a backup of $ORACLE_HOME/OPatch into a dedicated backup location. (2) Please remove the contents of $ORACLE_HOME/OPatch directory (Please do not remove $ORACLE_HOME/OPatch directory itself) (3) Please unzip the OPatch downloaded zip into $ORACLE_HOME directory. To check the version of the opatch utility installed in the above step, go to the $ORACLE_HOME/OPatch directory and run "opatch version". How to run the utility: ----------------------- OPatch tool requires JDK (or) JRE to be present in the Oracle Home. It requires JDK/JRE version of 1.5.0 or higher to function properly. It can be invoked directly using /opatch [] [options] You can use the following command format to view help information: /opatch [] -help OPatch can be manually invoked using Perl: /perl /opatch.pl [options] You can use the following command format to view help information: /perl /opatch.pl [] -help There is a User's Guide in the 'docs' subdirectory that has full details on running the tool. There is FAQ file in the same directory that answers many of the common questions. If you don't have Perl, you can download Perl from Metalink (http://myoraclesupport.oracle.com) using Bug 2417872. Source code for perl is also available from http://www.cpan.org (the Comprehensive Perl Archive Network). Links to binary versions of perl for supported operating systems is also provided on the CPAN web site. You can download the required version of JDK/JRE from http://www.oracle.com/technetwork/java/index.html Special Instructions: --------------------- Windows: -------- 1) If your "Central Inventory" is not under C:\Program Files\oracle\inventory, please set env. var. INVENTORY_LOC to the value of the registry key \\HKEY_LOCAL_MACHINE\Software\Oracle\inst_loc 2) Make sure you have java.exe in your PATH ======================================================================== 1. 기존 OPatch 유틸리티 디렉토리 내용 삭제 NODE 1 & 2 [root@rac1:~]# rm –rf /u01/app/oracle/11.2.0.3.0/db/OPatch/* [root@rac1:~]# rm –rf /u01/app/11.2.0.3.0/grid/OPatch/* 2. OPatch 유틸리티 압축 해제 - OPatch file location : /u01/media/p6880880_112000_Linux-x86-64.zip - $ORACLE_HOME : /u01/app/oracle/11.2.0.3.0/db Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 3 / 17 - $GRID_HOME : /u01/app/11.2.0.3/grid NODE 1 & 2 [oracle@rac1 ~]$ cd /u01/media [oracle@rac1 ~]$ unzip p6880880_112000_Linux-x86-64.zip –d /u01/app/oracle/11.2.0.3.0/db [oracle@rac1 ~]$ unzip p6880880_112000_Linux-x86-64.zip -d /u01/app/11.2.0.3/grid 3. OPatch version 적용 및 확인 NODE 1 & 2 [oracle@rac1 ~]$ /u01/app/oracle/11.2.0.3.0/db/OPatch/opatch version [oracle@rac1 ~]$ /u01/app/11.2.0.3/grid/OPatch/opatch version Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 4 / 17 4. Oracle Inventory 확인 NODE 1 & 2 [oracle@rac1 ~]$ /u01/app/oracle/11.2.0.3.0/db/OPatch/opatch lsinventory –oh /u01/app/oracle/11.2.0.3.0/db [oracle@rac1 ~]$ /u01/app/oracle/11.2.0.3.0/db/OPatch/opatch lsinventory –oh /u01/app/11.2.0.3/grid/ Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 5 / 17 . . . * 본 화면은 Bundle Patch 적용 후 이므로, Interim Patches와 Patch Description에 11.2.0.3.5라고 나온다. ORACLE_HOME, OPatch Version 확인하고 끝에 OPatch succeeded 가 나와야한다. Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 6 / 17 5. EM (Enterprise Manager) 중지. dbca로 설치 했을 경우 NODE 1 & 2 [oracle@rac1 ~]$ /u01/app/oracle/11.2.0.3.0/db/bin/emctl stop dbconsole 6. OCM response 파일 생성 *반드시 해당 디렉토리로 위치한 후 생성해야한다. NODE 1 & 2 [oracle@rac1 ~]$ cd /u01/app/oracle/11.2.0.3.0/db/OPatch/ocm/bin/ [oracle@rac1 ~]$ ./emctl enter 후 ‘y’ enter Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 7 / 17 7. Bundle Patch 압축해제 -patch location : /u01/media/p14727347_112030_Linux-x86-64_BP5.zip -unzipped_patch_location : /u01/app/oracle/11.2.0.3.0/patch NODE 1 & 2 [oracle@rac1 ~]$ mkdir /u01/app/oracle/11.2.0.3.0/patch [oracle@rac1 ~]$ unzip /u01/media/p14727347_112030_Linux-x86-64_BP5.zip –d /u01/app/oracle/11.2.0.3.0/patch Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 8 / 17 8. Bundle Patch 적용 Case 1 : GI Home and the Database Homes that are not shared and ACFS file system is not configured * opatch auto 사용시 Oracle RAC database home apply 후, GI home 이 apply 되므로. export ORACLE_HOME=$GRID_HOME(full path) 로 바꿔준 후 사용. 순서는 항상 GI Home 적용 후 DB Home이다. Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 9 / 17 Case 2 : GI Home is not shared, Database Home is shared, ACFS may be used. (ASM) NODE 1 NODE 2 Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 10 / 17 * CASE1번이나 2번이나 RAC DB를 수동으로 STOP 시키지 않아도 된다. opatch auto 옵 션이 자동으로 DB를 STOP시켜준다. * raw 방식이나 asm방식 둘다 동일하다. BUNDLE PATCH 디렉토리 적용 순서가 중요하다. 순서는 <GI_HOME> 적용 후 <DATABASE_HOME> 이다. <unzipped_patch_location> : /u01/app/oracle/11.2.0.3.0/patch <GI_HOME> : /u01/app/11.2.0.3/grid <DATABASE_HOME> : /u01/app/oracle/11.2.0.3.0/db/ <ocm_responsefile> : u01/app/oracle/11.2.0.3.0/db/OPatch/ocm/bin/ocm.rsp NODE 1 & 2 [root@rac1 ~]# /u01/app/oracle/11.2.0.3.0/OPatch/opatch auto /u01/app/oracle/11.2.0.3.0/patch -oh /u01/app/11.2.0.3/grid -ocmrf /u01/app/oracle/11.2.0.3.0/db/OPatch/ocm/bin/ocm.rsp [root@rac1 ~]# /u01/app/oracle/11.2.0.3.0/OPatch/opatch auto /u01/app/oracle/11.2.0.3.0/patch -oh /u01/app/oracle/11.2.0.3.0/db -ocmrf /u01/app/oracle/11.2.0.3.0/db/OPatch/ocm/bin/ocm.rsp Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 11 / 17 . . 생략 Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 12 / 17 9. 변경된 SQL Files DB에 적용 Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 13 / 17 * catbundle.sql location /u01/app/oracle/11.2.0.3.0/db/rdbms/admin NODE 1 ONLY [oracle@rac1 ~]$ cd /u01/app/oracle/11.2.0.3.0/db/rdbms/admin [oracle@rac1 ~]$ sqlplus / as sysdba <sql> startup <sql> select instance_name, status from v$insatance; <sql> @catbundle.sql psu apply <sql> exit <sql> exit Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 14 / 17 . . . . 생략 Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 15 / 17 10. 적용 확인 NODE 1 & 2 [oracle@rac1 ~]$ /u01/app/oracle/11.2.0.3.0/db/OPatch/opatch lsinventory -oh /u01/app/11.2.0.3/grid [oracle@rac1 ~]$ /u01/app/oracle/11.2.0.3.0/db/OPatch/opatch lsinventory -oh /u01/app/oracle/11.2.0.3.0/db Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 16 / 17 . . . . 생략 Bundle Patch Guide(RAC OEL5.9+11.2.0.3.0 to 11.2.0.3.5) - 34기 Jay Lee 페이지 17 / 17