How to run Opatch in Silent mode without User Interaction


In this post, I am going to share the steps on how to run the Opatch in Silent mode. This is helpful when you want to automate Opatch utility and don't want any user interaction.


Steps:

1)Download and install the latest opatch tool.
Patch # 6880880
Select a Release: 10.2  -OR-  11.1 -OR-  11.2 -OR-  12.1 

2)Create a response file and copy the created response file at any required location.

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)

I don't want to provide any email address to just hit enter and y to stay uninformed.

[oracle@ebs122 ~]$/oracleapps/DATABASE/GOLD/12.1.0/OPatch/ocm/bin/emocmrsp

OCM Installation Response Generator 10.3.7.0.0 - Production
Copyright (c) 2005, 2012, Oracle and/or its affiliates.  All rights reserved.

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: 

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
The OCM configuration response file (ocm.rsp) was successfully created.


ocm.rsp file can be also used with other OH - like, GRID, CRS, ORACLE_HOME, make sure this file is placed in an accessible path and have 775 file permission (i.e $chmod  775 ocm.rsp)


3) Use the response file to apply any patch in the silent mode now.

cd 22496904
opatch apply -silent -ocmrf $ORACLE_HOME/OPatch/ocm.rsp

Examples (Showing command usage for  CPU/SPU/PSU/ "opatch auto" )

1) User below for CPU/SPU apply
opatch napply -silent -ocmrf <ORACLE_HOME>/ocm.rsp

2)Use below for  PSU apply
opatch apply -silent -ocmrf <ORACLE_HOME>/ocm.rsp
3)GRID patching command changed sightly as below 
opatch auto -ocmrf <ORACLE_HOME>/ocm.rsp


Note:- Starting with OPatch version  12.2.0.1.5  and higher,opatchauto execution doesn't require ocm.rsp






If you like please follow and comment