How to Create an OCM Response file to Apply a Patch in Silent Mode - opatch silent (文档 ID 966023.1)
In this Document
| Goal |
| Solution |
| 1) Download and install latest opatch tool (ignore this if already done) |
| 2) Create response file for OCM |
| 3) Use the OCM response file for all opatch silent application |
| 1) Download and install latest opatch tool (recommended) |
| Refer the options below to create a ocm response file |
| References |
APPLIES TO:
Oracle Universal Installer - Version 10.2.0.1 to 12.1.0.2 [Release 10.2 to 12.1]
Oracle Database - Enterprise Edition - Version 10.2.0.1 to 12.2.0.1 [Release 10.2 to 12.2]
Information in this document applies to any platform.
GOAL
This Article helps in creating the OCM response file to run opatch in silent mode
Scenario:
While installing patch in silent mode, opatch tool prompts User for OCM configuration, this makes Opatch to break the silent install process and patch apply for User response. (And this violates silent install feature).
However, this can be solved via creating an OCM response file and pass all the parameters via this file while silent install. Opatch reads this file while installing in silent does not prompt for OCM credentials.
What is OCM (Oracle Configuration Manager?)
The Oracle Configuration Manager (OCM) is a tool which proactively monitor the customers Oracle environment and provide this information to My Oracle Support (MOS). The Data collected from the customer environment is uploaded to Oracle Customer Configuration Repository and replicates this to My Oracle Support so that customer/support can view it. Additionally MOS analyzes the Data collected and informs respective customer about alerts and advise health checks. For more information refer Note: 369619.1
SOLUTION
Pre-requirements to use opatch silent
1) Download and install latest opatch tool (ignore this if already done)
2) Create response file for OCM
3) Use the OCM response file for all opatch silent application
However, If plan to use the ocm.rsp file with other OH - like, GRID, CRS, ORACLE_HOME, then please make sure this file is placed in accessible path and have 775 file permission (i.e $chmod 775 ocm.rsp)
========= refer below for detailed steps =============
1) Download and install latest opatch tool (recommended)
Patch # 6880880
Select a Release: 10.2 -OR- 11.1 -OR- 11.2 -OR- 12.1
2) How to create response file for OCM
Note : the location of OCM executable is "$ORACLE_HOME/OPatch/ocm/bin/emocmrsp" syntax :
% export ORACLE_HOME=<my_oracle_home_path>
% $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output <specify_the_location>/file.rsp
* creates the response in location specified by the parameter "-output"
* running without "-output <specify_the_location>/file.rsp" creates the file in current directory with default name(ocm.rsp)
Refer the options below to create a ocm response file
Option 1 : Create the response file while keeping OCM turned OFF (Yes, OCM can be turned off. use this options if you are not sure about OCM )
% export ORACLE_HOME=/u01/app/oracle/11.2/db1
% $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /u02/ocm.rsp
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:
<<<< Press Enter/Return key and don't provide any input >>>>
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: Y <<< type Y/Yes >>>
The OCM configuration response file (/u02/ocm.rsp) was successfully created. <<
Option 2 : Create the response file while keep OCM turn ON / Active (Yes, OCM can be turned ON. use this "options 1" if you are not sure about OCM )
% export ORACLE_HOME=/u01/app/oracle/11.2/db1
% $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /u02/ocm.rsp
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name: <Provide Oracle Metalink Email address Example: user@oracle.com >
Password (optional): <Password will be verified if provided / Press return/Enter Key>
The OCM configuration response file (/u02/ocm.rsp) was successfully created. <<<
Note 1 : we can preserve the file “/u02/ocm.rsp” ( rename if needed) and could be used with other similar ORACLE_HOME/setup/machine
Note 2 : Also applicable to Grid home patching (opatch -auto -ocmrf instead "-silent" )
However, If plan to use the ocm.rsp file with other OH - like, GRID, CRS, ORACLE_HOME, then please make sure this file is placed in accessible path and have 775 file permission (i.e $chmod 775 ocm.rsp)
3) Use the OCM response file for all "opatch -silent" operations
Assume applying patch 12345
% cd 12345
% opatch apply -silent -ocmrf <path_to_response_file>
Example: % opatch apply -silent -ocmrf /u02/ocm.rsp
Additional Examples (Showing command usage for CPU/SPU/PSU/ "opatch auto" )
1) User below for CPU/SPU apply
% opatch napply -silent -ocmrf /u02/ocm.rsp
2)Use below for PSU apply
% opatch apply -silent -ocmrf /u02/ocm.rsp
3)GRID patching command changed sightly as below
% opatch auto -ocmrf /u02/ocm.rsp
Note1 : F ile “/u02/ocm.rsp” (could be renamed as per requirement ) can be used with other opatch -silent when used with other ORACLE_HOME/setup/machine, however, mention this file while invoking opatch -silent
Note3: Also applicable to Grid home patching (opatch -auto -ocmrf instead "-silent" )
However, If plan to use the ocm.rsp file with other OH - like, GRID, CRS, ORACLE_HOME, then please make sure this file is placed in accessible path and have 775 file permission (i.e $chmod 775 ocm.rsp)
Note :- Starting with OPatch version 12.2.0.1.5 and higher ,opatchauto execution doesn't require ocm.rsp .
REFERENCES
NOTE:1351428.2 - Information Center: Patching and Maintaining Oracle Database Server/Client Installations
NOTE:369619.1 - OCM ( Oracle Configuration Manager ) and My Oracle Support : FAQ and Troubleshooting
NOTE:293369.1 - Master Note For OPatch
About Me
........................................................................................................................ ● 本文作者:小麦苗,部分内容整理自网络,若有侵权请联系小麦苗删除 ● 本文在itpub( http://blog.itpub.net/26736162 )、博客园( http://www.cnblogs.com/lhrbest )和个人weixin公众号( xiaomaimiaolhr )上有同步更新 ● 本文itpub地址: http://blog.itpub.net/26736162 ● 本文博客园地址: http://www.cnblogs.com/lhrbest ● 本文pdf版、个人简介及小麦苗云盘地址: http://blog.itpub.net/26736162/viewspace-1624453/ ● 数据库笔试面试题库及解答: http://blog.itpub.net/26736162/viewspace-2134706/ ● DBA宝典今日头条号地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826 ........................................................................................................................ ● QQ群号: 230161599 (满) 、618766405 ● weixin群:可加我weixin,我拉大家进群,非诚勿扰 ● 联系我请加QQ好友 ( 646634621 ) ,注明添加缘由 ● 于 2018-10-01 06:00 ~ 2018-10-31 24:00 在魔都完成 ● 最新修改时间:2018-10-01 06:00 ~ 2018-10-31 24:00 ● 文章内容来源于小麦苗的学习笔记,部分整理自网络,若有侵权或不当之处还请谅解 ● 版权所有,欢迎分享本文,转载请保留出处 ........................................................................................................................ ● 小麦苗的微店 : https://weidian.com/s/793741433?wfr=c&ifr=shopdetail ● 小麦苗出版的数据库类丛书 : http://blog.itpub.net/26736162/viewspace-2142121/ ● 小麦苗OCP、OCM、高可用网络班 : http://blog.itpub.net/26736162/viewspace-2148098/ ● 小麦苗腾讯课堂主页 : https://lhr.ke.qq.com/ ........................................................................................................................ 使用 weixin客户端 扫描下面的二维码来关注小麦苗的weixin公众号( xiaomaimiaolhr )及QQ群(DBA宝典)、添加小麦苗weixin, 学习最实用的数据库技术。 ........................................................................................................................ |
![]() | |
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26736162/viewspace-2218001/,如需转载,请注明出处,否则将追究法律责任。