Since version 9.2, Oracle has implemented a patch installation tool opatch. opatch uses a system data structure called inventory (shared
Since version 9.2, Oracle has implemented a patch installation tool opatch. opatch uses a system data structure called inventory (shared
1. OPatch tool description
The opatch tool was mentioned in the previous Oracle patch system blog:
Introduction to Oracle patch system and opatch tools
Since version 9.2, Oracle has implemented the opatch patch installation tool. opatch uses a system data structure called inventory (shared with oui strictly) to centrally manage all installed patches. The opatch command is used to install and uninstall individual patches, conflict Detection is automatically completed by opatch during installation. a list command is provided to conveniently obtain information about the patches that have been installed.
In version 10g (10.1 and 10.2), opatch is automatically installed as a standard tool during installation. (Install it in $ ORACLE_HOME/OPatch .) For version 9.2, You need to download opatch from metalink. whether or not opatch is installed in the system or not, You should download the latest version of opatch from metalink before use. unfortunately, due to system implementation problems, the opatch used in 10.2 is incompatible with the opatch used in earlier versions (10.1 and 9.2) and cannot be mixed. This must be noted.
Opatch is a script program written in perl (java api is also used ). The perl version used is version 5.6. Although it can also be run in versions earlier than version 5.6, install perl of version 5.6 or later as much as possible. the good news for DBA is that if the HTTP server is retained when you install version 9.2, perl will be automatically installed under $ ORACLE_HOME/Apache. (10 Gb will automatically install and configure perl and opatch .)
Because the differences between OPatch versions also bring inconvenience. For example, when we use the OPatch tool to upgrade the database to 10.2.0.5.x, we must require that the OPatch version be 10.2.0.5 or later. When we upgrade the instance to 10.2.0.5, The OPatch version is 10.2.0.4.9. we cannot meet our requirements. In this case, you need to download a later version of OPatch from MOS separately and update the OPatch under ORACLE_HOME before you can continue the upgrade.
SQL> select * from v $ version whererownum = 1;
BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise EditionRelease 10.2.0.5.0-Prod
Dave:/u01/app/oracle/product/10.2.0/db_1/OPatch>./opatch version
Invoking OPatch 10.2.0.4.9
OPatch Version: 10.2.0.4.9
OPatch succeeded.
Ii. Update OPatch tool Methods
The method for updating the OPatch tool is simple. You only need to download the corresponding Patch from the MOS and overwrite the OPatch directory under ORACLE_HOME. Before overwriting, back up the data.
Patch no of the OPatch tool 10.2.0.3.4 is: 4898608
Patch no of the OPatch tool 10.2.0.5 is: 6880880. For the version of the OPatch Patch, the related upgrade documents will be described in detail.
Dave:/u01/app/oracle/product/10.2.0/db_1>Mv OPatch. bak
Dave:/u01/app/oracle/product/10.2.0/db_1>Cp/mnt/OracleSoftware/OPatch_10.2_p6880880/p6880880_102000_LINUX.zip $ ORACLE_HOME
Dave:/u01/app/oracle/product/10.2.0/db_1> ls
Assistants dbs jlib odbc perl sqlnet. log
Bin demo jre ODBC plsql sqlplus
Ccr diagnostics ldap olap precomp srvm
Cdata has lib OPatch. bak racg sysman
Cfgtoollogs hs log opmn rdbms uix
Clone install md oracore relnotes wwg
Config install. platform mesg oraInst. loc root. sh xdk
Crs inventory mgw ord root. sh. old
Css javavm network oui root. sh. old.1
Ctx jdbc nls owm slax
Dave_anqing jdk Solaris p6880880_102000_LINUX.zip sqlj
Dave:/u01/app/oracle/product/10.2.0/db_1>Unzip p6880880_102000_LINUX.zip
Archive: p6880880_102000_LINUX.zip
Creating: OPatch/
Creating: OPatch/ocm/
Extracting: OPatch/ocm/ocm.zip
Creating: OPatch/ocm/lib/
Inflating: OPatch/ocm/lib/osdt_jce.jar
Inflating: OPatch/ocm/lib/osdt_core3.jar
Inflating: OPatch/ocm/lib/emocmclnt-14.jar
Inflating: OPatch/ocm/lib/emocmutl. jar
Creating: OPatch/ocm/bin/
Inflating: OPatch/ocm/bin/emocmrsp
Inflating: OPatch/ocm/ocm_platforms.txt
Creating: OPatch/crs/
Creating: OPatch/crs/log/
Inflating: OPatch/crs/patch112.pl
Inflating: OPatch/crs/crsdelete. pm
Inflating: OPatch/crs/crspatch. pm
Inflating: OPatch/crs/s_crsconfig_defs
Inflating: OPatch/crs/crsconfig_lib.pm
Inflating: OPatch/crs/messaging ss. pm
Inflating: OPatch/crs/auto_patch.pl
Inflating: OPatch/crs/s_crsconfig_lib.pm
Inflating: OPatch/opatch
Creating: OPatch/opatchprereqs/
Creating: OPatch/opatchprereqs/opatch/
Inflating: OPatch/opatchprereqs/opatch/runtime_prereq.xml
Inflating: OPatch/opatchprereqs/opatch/opatch_prereq.xml
Inflating: OPatch/opatchprereqs/opatch/rulemap. xml
Inflating: OPatch/opatchprereqs/prerequisite. properties
Creating: OPatch/opatchprereqs/oui/
Inflating: OPatch/opatchprereqs/oui/knowledgesrc. xml
Inflating: OPatch/opatch. ini
Inflating: OPatch/emdpatch. pl
Inflating: OPatch/opatch. pl
Creating: OPatch/jlib/
Inflating: OPatch/jlib/opatchprereq. jar
Inflating: OPatch/jlib/opatchactions. jar
Inflating: OPatch/jlib/opatchutil. jar
Inflating: OPatch/jlib/opatchfmw. jar
Inflating: OPatch/jlib/opatchext. jar
Inflating: OPatch/jlib/opatch. jar
Inflating: OPatch/opatch. bat
Creating: OPatch/docs/
Inflating: OPatch/docs/Prereq_Users_Guide.txt
Inflating: OPatch/docs/FAQ
Inflating: OPatch/docs/Users_Guide.txt
Inflating: OPatch/README.txt
Dave:/u01/app/oracle/product/10.2.0/db_1>Ll OPatch
Total 80
Drwxr-xr-x 3 oracle oinstall 4096 Nov 3 2010 crs
Drwxr-xr-x 2 oracle oinstall 4096 Nov 3 2010 docs
-Rw-r -- 1 oracle oinstall 23695 Nov 3 2010emdpatch. pl
Drwxr-xr-x 2 oracle oinstall 4096 Nov 3 2010 jlib
Drwxr-xr-x 4 oracle oinstall 4096 Nov 3 2010 ocm
-R-x -- x --- 1 oracle oinstall 13252 Nov 3 2010 opatch
-Rwxr-xr-x 1 oracle oinstall 8085 Nov 3 2010 opatch. bat
-Rw-r -- 1 oracle oinstall 49 Nov 3 2010 opatch. ini
-Rw-r -- 1 oracle oinstall 2576 Nov 3 2010 opatch. pl
Drwxr-xr-x 4 oracle oinstall 4096 Nov 3 2010 opatchprereqs
-Rw-r -- 1 oracle oinstall 2417 Nov 3 2010 README.txt
Verify the OPatch tool Version:
Dave:/u01/app/oracle/product/10.2.0/db_1> cd OPatch
Dave:/u01/app/oracle/product/10.2.0/db_1/OPatch>./opatch version
Invoking OPatch 10.2.0.5.1
OPatch Version: 10.2.0.5.1
OPatch succeeded.
When the OPatch version comes up, you can perform other operations.