经验首页 前端设计 程序设计 Java相关 移动开发 数据库/运维 软件/图像 大数据/云计算 其他经验
当前位置:技术经验 » 数据库/运维 » Oracle » 查看文章
OPATCH在线补丁
来源:cnblogs  作者:九命猫幺  时间:2019/8/27 9:48:30  对本文有异议

如果补丁中有online目录就是在线补丁,不需要数据库停机,在线的又分集群和非集群,如下

image查看readme可以得知在线补丁打法

  1. $ cat README.txt
  2. Oracle Database 11g Release 11.2.0.3.0
  3. ORACLE DATABASE Patch for Bug# 12834800 for Linux-x86 Platforms
  4.  
  5. (RAC Rolling Installable and Online Installable Patch)
  6.  
  7. (DG Rolling Installable)
  8.  
  9. Released: Sat Jan 28 10:03:32 2012
  10.  
  11. This document describes how you can install the ORACLE DATABASE combo patch for bug# 12834800 on your Oracle Database 11g Release 11.2.0.3.0.
  12.  
  13. A combo patch is a patch that can be applied either in offline mode or in online mode. For information about offline and online modes of patching, see My Oracle Support note 761111.1 available at:
  14. https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=761111.1
  15. (1) Prerequisites
  16. ------------------
  17. Before you install or deinstall the patch, ensure that you meet the following requirements:
  18. Note: In case of an Oracle RAC environment, meet these prerequisites on each of the nodes.
  19.  
  20. 1. Ensure that the Oracle Database on which you are installing the patch or from which you are rolling back the patch is Oracle Database 11g Release (11.2.0.3.0).
  21.  
  22. 2. Oracle recommends you to use the latest version of OPatch.
  23. If you do not have the latest version, then follow the instructions outlined in the My Oracle Support note 224346.1 available at:
  24. https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=224346.1
  25.  
  26. 3. Ensure that you set the ORACLE_HOME environment variable to the Oracle home of the Oracle Database.
  27.  
  28. 4. Ensure that you set the PATH environment variable to include the location of the unzip executable, and the /bin and the /OPatch directories present in the Oracle home of the Oracle Database.
  29. 5. Ensure that you verify the Oracle Inventory because OPatch accesses it to install the patches. To verify the inventory, run the following command. If the command displays some errors, then contact Oracle Support and resolve the issue.
  30. $ opatch lsinventory
  31. 6. (Only for Offline Patching) Ensure that you shut down all the services running from the Oracle home.
  32. 7. (Only for Online Patching) Ensure that all the services in the Oracle home are up and running.
  33. 8. (Only for Online Patching) Ensure that you maintain adequate memory on your system to apply this online patch. To calculate the amount of memory required for this online patch, use the following formula:
  34. Memory Consumed = (Number of Oracle Processes + 1) X (Size of Patched .pch File)
  35. Note:
  36. - For UNIX, the number of Oracle processes is determined by checking the parameter "processes" in the database by querying v$parameter. For Microsoft Windows, the number of Oracle processes is always zero (0).
  37. - The .pch file is available under /files/hpatch/ directory.
  38. (2) Installation
  39. -----------------
  40. This section describes the following modes you can use to install the combo patch. Use the one that best suits your requirement.
  41. - Installing in Offline Mode
  42. - Installing in Online Mode
  43. (2.1) Installing in Offline Mode
  44. -----------------------------------
  45. To install the patch in offline mode, follow these steps:
  46. Note: In case of an Oracle RAC environment, perform these steps on each of the nodes.
  47. 1. Maintain a location for storing the contents of the patch ZIP file. In the rest of the document, this location (absolute path) is referred to as .
  48. 2. Extract the contents of the patch ZIP file to the location you created in Step (1). To do so, run the following command:
  49. $ unzip -d p12834800_112030_LINUX.zip
  50. 3. Navigate to the /12834800 directory:
  51. $ cd /12834800
  52. 4. Install the patch by running the following command:
  53. $ opatch apply
  54. Note:
  55. When OPatch starts, it validates the patch and ensures that there are no conflicts with the software already installed in the ORACLE_HOME of the Oracle Database. OPatch categorizes conflicts
  56. into the following types:
  57. - Conflicts with a patch already applied to the ORACLE_HOME - In this case, stop the patch installation and contact Oracle Support Services.
  58. - Conflicts with a patch already applied to the ORACLE_HOME that is a subset of the patch you are trying to apply - In this case, continue with the patch installation because the new patch
  59. contains all the fixes from the existing patch in the ORACLE_HOME. The subset patch will automatically be rolled back prior to the installation of the new patch.
  60. 5. Start the services from the Oracle home.
  61. (2.2) Installing in Online Mode
  62. -----------------------------------
  63. To install the patch in online mode, follow these steps:
  64. Note: In case of an Oracle RAC environment, perform these steps on each of the nodes.
  65. 1. Maintain a location for storing the contents of the patch ZIP file. In the rest of the document, this location (absolute path) is referred to as .
  66. 2. Extract the contents of the patch ZIP file to the location you created in Step (1). To do so, run the following command:
  67. $ unzip -d p12834800_112030_LINUX.zip
  68. 3. Navigate to the /12834800 directory:
  69. $ cd /12834800
  70. 4. Install the patch by running the following command:
  71. - For Non-RAC Environments (Standalone Databases):
  72. $ opatch apply online -connectString :::
  73. - For RAC Environments:
  74. $ opatch apply online -connectString :::,:::,:::
  75. Note:
  76. - Run the previous command on the first node of the Oracle RAC system, and specify details of each node separated by a comma. In the command, NodeN refers to the different nodes of the
  77. Oracle RAC system. Once the patch is applied on the first node, OPatch automatically moves over and patches the next node you have specified in the comamnd.
  78. - When OPatch starts, it validates the patch and ensures that there are no conflicts with the software already installed in the ORACLE_HOME of the Oracle Database. OPatch categorizes conflicts
  79. into the following types:
  80. - Conflicts with a patch already applied to the ORACLE_HOME that is a subset of the patch you are trying to apply - In this case, continue with the patch installation because the new patch
  81. contains all the fixes from the existing patch in the ORACLE_HOME. The subset patch will automatically be rolled back prior to the installation of the new patch.
  82. - Conflicts with a patch already applied to the ORACLE_HOME - In this case, stop the patch installation and contact Oracle Support Services.
  83. 5. Start the services from the Oracle home.
  84. (3) Deinstallation
  85. --------------------
  86. This section describes the following modes you can use to deinstall the combo patch. Use the one that best suits your requirement.
  87. - Deinstalling in Offline Mode
  88. - Deinstalling in Online Mode
  89. (3.1) Deinstalling in Offline Mode
  90. -------------------------------------
  91. To deinstall the patch in offline mode, follow these steps:
  92. Note: In case of an Oracle RAC environment, perform these steps on each of the nodes.
  93. 1. Navigate to the /12834800 directory:
  94. $ cd /12834800
  95. 2. Deinstall the patch by running the following command:
  96. $ opatch rollback -id 12834800
  97. 3. Start the services from the Oracle home.
  98. (3.2) Deinstalling in Online Mode
  99. --------------------------------------
  100. To deinstall the patch in online mode, follow these steps:
  101. Note: In case of an Oracle RAC environment, perform these steps on each of the nodes.
  102. 1. Navigate to the /12834800 directory:
  103. $ cd /12834800
  104. 2. Deinstall the patch by running the following command:
  105. - For Non-RAC Environments (Standalone Databases):
  106. $ opatch rollback -id 12834800 -connectString :::
  107. - For RAC Environments:
  108. $ opatch rollback -id 12834800 -connectString :::,:::,:::
  109. Note:
  110. Run the previous command on the first node of the Oracle RAC system, and specify details of each node separated by a comma. In the command, NODEn refers to the different nodes of the
  111. Oracle RAC system. Once the patch is rolled back from the first node, OPatch automatically moves over and rolls back the patch from the next node you have specified in the comamnd.
  112. 3. Start the services from the Oracle home.
  113. (4) Bugs Fixed by This Patch
  114. ---------------------------------
  115. The following are the bugs fixed by this patch:
  116. 12834800: ORA-7445 [QKXRPXFORMUNM()+92]
  117. --------------------------------------------------------------------------
  118. Copyright 2012, Oracle and/or its affiliates. All rights reserved.

打个补丁

  1. $ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch apply online -connectString PROD4:sys:oracle:
  2. Invoking OPatch 11.2.0.1.7
  3.  
  4. Oracle Interim Patch Installer version 11.2.0.1.7
  5. Copyright (c) 2011, Oracle Corporation. All rights reserved.
  6.  
  7.  
  8. Oracle Home : /u01/app/oracle/product/11.2.0/db_1
  9. Central Inventory : /u01/app/oraInventory
  10. from : /etc/oraInst.loc
  11. OPatch version : 11.2.0.1.7
  12. OUI version : 11.2.0.3.0
  13. Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2019-04-01_16-45-58PM.log
  14.  
  15.  
  16. The patch should be applied/rolled back in '-all_nodes' mode only.
  17. Converting the RAC mode to '-all_nodes' mode.
  18. Applying interim patch '12834800' to OH '/u01/app/oracle/product/11.2.0/db_1'
  19. Verifying environment and performing prerequisite checks...
  20.  
  21. Do you want to proceed? [y|n]
  22. y
  23. User Responded with: Y
  24. All checks passed.
  25. Backing up files...
  26.  
  27. Patching component oracle.rdbms, 11.2.0.3.0...
  28. The patch will be installed on active database instances.
  29. Installing and enabling the online patch 'bug12834800.pch', on database 'PROD4'.
  30.  
  31. Patch 12834800 successfully applied
  32. Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2019-04-01_16-45-58PM.log
  33.  
  34. OPatch succeeded.
  1. $ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch lsinventory
  2. Invoking OPatch 11.2.0.1.7
  3.  
  4. Oracle Interim Patch Installer version 11.2.0.1.7
  5. Copyright (c) 2011, Oracle Corporation. All rights reserved.
  6.  
  7.  
  8. Oracle Home : /u01/app/oracle/product/11.2.0/db_1
  9. Central Inventory : /u01/app/oraInventory
  10. from : /etc/oraInst.loc
  11. OPatch version : 11.2.0.1.7
  12. OUI version : 11.2.0.3.0
  13. Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2019-04-01_16-48-44PM.log
  14.  
  15. Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2019-04-01_16-48-44PM.txt
  16.  
  17. --------------------------------------------------------------------------------
  18. Installed Top-level Products (1):
  19.  
  20. Oracle Database 11g 11.2.0.3.0
  21. There are 1 products installed in this Oracle Home.
  22.  
  23.  
  24. Interim patches (1) :
  25.  
  26. Patch (online) 12834800: applied on Mon Apr 01 16:47:17 CST 2019
  27. Unique Patch ID: 14522435
  28. Created on 28 Jan 2012, 10:16:59 hrs PST8PDT
  29. Bugs fixed:
  30. 12834800
  31.  
  32.  
  33.  
  34. --------------------------------------------------------------------------------
  35.  
  36. OPatch succeeded.

原文链接:http://www.cnblogs.com/yongestcat/p/11413431.html

 友情链接:直通硅谷  点职佳  北美留学生论坛

本站QQ群:前端 618073944 | Java 606181507 | Python 626812652 | C/C++ 612253063 | 微信 634508462 | 苹果 692586424 | C#/.net 182808419 | PHP 305140648 | 运维 608723728

W3xue 的所有内容仅供测试,对任何法律问题及风险不承担任何责任。通过使用本站内容随之而来的风险与本站无关。
关于我们  |  意见建议  |  捐助我们  |  报错有奖  |  广告合作、友情链接(目前9元/月)请联系QQ:27243702 沸活量
皖ICP备17017327号-2 皖公网安备34020702000426号