How to create an OCM Response file to apply patch in silent mode - opatch silent (Doc ID 966023.1)
Applies to:
Oracle Universal Installer - Version 10.2.0.4 to 11.2.0.3 [Release 10.2 to 11.2]Oracle Database - Enterprise Edition - Version 10.2.0.4 to 11.2.0.3 [Release 10.2 to 11.2]
Information in this document applies to any platform.
Goal
This Article helps in crating 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 park 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 refers this files while installing in silent and forwards silently with applying patch without prompting for OCM credentials.
Solution
We need to created the ocm response file prior Invoking opatch in silent mode - this falls in to 2 parts
Part A : first create the OCM response file via "emocmrsp" executable ($ORACLE_HOME/OPatch/ocm/bin/emocmrsp)
Part B : User the response file created in Part A with opatch silent ($ORACLE_HOME/OPatch/opatch)
Please refer below prior scrolling down to Part A for creating the response file !
1) What is OCM (Oracle Configuration Manager)
2) Download and install latest opatch tool (recommended)
Select a Release : 10.2 Or 11.1 Or 11.2 OR 12.1 (Based on ORACLE_HOME/Database version )
Part A
create a ocm response file ($ORACLE_HOME/OPatch/ocm/bin/emocmrsp)
% 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" creats the file in current directory with default name
Refer the examples below to create a ocm response file
Example 1 : Create the response file and keep OCM turn OFF (use this if you are not sure OCM ON and OFF)
% export ORACLE_HOME=/u01/app/oracle/11.2/db1
% $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /u02/unconfig.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/unconfig.rsp) was successfully created. <<
Example 2 : Create the response file and keep OCM turn ON / Active (use ‘Example 1‘ if you are not sure OEM ON and OFF)
% export ORACLE_HOME=/u01/app/oracle/11.2/db1
% $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /u02/config.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:
[email protected] >
Password (optional): <Password will be verified if provided / Press return/Enter Key>
The OCM configuration response file (/u02/config.rsp) was successfully created. <<<
Note1 : we can preserver the file “/u02/config.rsp” (could be renamed ) and use with other opath -silent when used with other ORACLE_HOME/setup/machine, however, mention this file while invoking opatch -silent
Note2: Also applicable to patching Grid Home (opatch -auto -silnet)
Part B
Use the response file created in Part A (/u02/unconfig.rsp) with opatch -silent
Assume applying patch 12345
% cd 12345
% opatch apply -silent -ocmrf <path_to_response_file>
Example: % opatch apply -silent -ocmrf /u02/config.rsp
Additional Examples (Showing command usgae for CPU/SPU/PSU/ "opatch auto" )
% opatch napply -silent -ocmrf /u02/config.rsp
% opatch apply -silent -ocmrf /u02/unconfig.rsp
% opatch auto -silent -ocmrf /u02/config.rsp
Note1 : "/u02/config.rsp" is a response file created in Part A
Note2 : we can preserver the file “/u02/config.rsp” (could be renamed ) and use with other opath -silent when used with other ORACLE_HOME/setup/machine, however, mention this file while invoking opatch -silent
Note3: Also applicable to Grid home pathcing (opatch -auto -silent)
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。