search
HomeDatabaseMysql TutorialOracle 更新 OPatch 工具版本 的方法 说明

从9.2版开始,Oracle公司实现了个别补丁安装工具opatch. opatch使用一个称为inventory的系统数据结构(严格说是与oui共享invento

一.OPatch 工具说明

在之前的Oracle 补丁体系的blog 提到了opatch工具:

Oracle 补丁体系 及opatch 工具 介绍

从9.2版开始,Oracle公司实现了个别补丁安装工具opatch. opatch使用一个称为inventory的系统数据结构(严格说是与oui共享inventory),集中管理所有已安装的个别补丁;个别补丁的安装和卸载都使用opatch命令完成,冲突检测也由opatch在安装时自动完成;提供列表命令可以很方便得到已安装个别补丁的信息。

10g(10.1和10.2)版本中,opatch作为一个标准工具,在安装时自动安装。(安装在$ORACLE_HOME/OPatch下。)而对于9.2版,需要从metalink下载opatch.无论是哪一个版本,系统中是否已经安装opatch,在使用之前,应从metalink下载最新版本的opatch.很遗憾,由于系统实现的问题,10.2使用的opatch与之前版本(10.1和9.2)使用的opatch不兼容,不能混用,这一点必须注意。

opatch是使用perl编写的脚本程序(其中也使用JAVA API)。使用的perl版本是5.6版,虽然在5.6之前的版本中也可运行,但应尽可能安装5.6或以上的版本的perl. 对于DBA来说一个好消息是,如果安装9.2版软件时保留了HTTP服务器,则在$ORACLE_HOME/Apache下会自动安装perl.(10g会自动安装配置perl和opatch.)

因为OPatch 版本之间的差别也带来一些不方便。 比如我们使用OPatch 工具来升级数据库到10.2.0.5.x时,就必须要求OPatch的版本达到10.2.0.5 以上,而我们将实例升级到10.2.0.5时,OPatch 的版本缺是到了10.2.0.4.9. 达不到我们的要求。 这时候,就需要单独从MOS 上下载高版本的OPatch,更新ORACLE_HOME 下的OPatch 之后,才能继续进行升级。

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. 

二.更新OPatch 工具方法

更新OPatch 工具的方法很简单, 只需要从MOS 上下载对应Patch,,然后覆盖到ORACLE_HOME 下的OPatch目录即可。 当然覆盖之前,最好备份一下。      

       10.2.0.3.4的OPatch 工具Patch NO是:4898608

       10.2.0.5的OPatch 工具的Patch NO是: 6880880, 关于OPatch 补丁的版本,相关升级文档上会有详细说明。

dave:/u01/app/oracle/product/10.2.0/db_1>mv OPatch 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               oc4j     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/oracss.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--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  2010opatch

-rwxr-xr-x 1 oracle oinstall  8085 Nov 3  2010 opatch.bat

-rw-r--r-- 1 oracle oinstall    49 Nov 3  2010 opatch.ini

-rw-r--r-- 1 oracle oinstall  2576 Nov 3  2010 opatch.pl

drwxr-xr-x 4 oracle oinstall  4096 Nov 3  2010 opatchprereqs

-rw-r--r-- 1 oracle oinstall  2417 Nov 3  2010 README.txt 

验证OPatch 工具版本信息:

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. 

OPatch 的版本上来了,就可以进行其他的操作了。

linux

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
How to solve the problem of mysql cannot open shared libraryHow to solve the problem of mysql cannot open shared libraryMar 04, 2025 pm 04:01 PM

This article addresses MySQL's "unable to open shared library" error. The issue stems from MySQL's inability to locate necessary shared libraries (.so/.dll files). Solutions involve verifying library installation via the system's package m

Reduce the use of MySQL memory in DockerReduce the use of MySQL memory in DockerMar 04, 2025 pm 03:52 PM

This article explores optimizing MySQL memory usage in Docker. It discusses monitoring techniques (Docker stats, Performance Schema, external tools) and configuration strategies. These include Docker memory limits, swapping, and cgroups, alongside

How do you alter a table in MySQL using the ALTER TABLE statement?How do you alter a table in MySQL using the ALTER TABLE statement?Mar 19, 2025 pm 03:51 PM

The article discusses using MySQL's ALTER TABLE statement to modify tables, including adding/dropping columns, renaming tables/columns, and changing column data types.

Run MySQl in Linux (with/without podman container with phpmyadmin)Run MySQl in Linux (with/without podman container with phpmyadmin)Mar 04, 2025 pm 03:54 PM

This article compares installing MySQL on Linux directly versus using Podman containers, with/without phpMyAdmin. It details installation steps for each method, emphasizing Podman's advantages in isolation, portability, and reproducibility, but also

What is SQLite? Comprehensive overviewWhat is SQLite? Comprehensive overviewMar 04, 2025 pm 03:55 PM

This article provides a comprehensive overview of SQLite, a self-contained, serverless relational database. It details SQLite's advantages (simplicity, portability, ease of use) and disadvantages (concurrency limitations, scalability challenges). C

How do I configure SSL/TLS encryption for MySQL connections?How do I configure SSL/TLS encryption for MySQL connections?Mar 18, 2025 pm 12:01 PM

Article discusses configuring SSL/TLS encryption for MySQL, including certificate generation and verification. Main issue is using self-signed certificates' security implications.[Character count: 159]

Running multiple MySQL versions on MacOS: A step-by-step guideRunning multiple MySQL versions on MacOS: A step-by-step guideMar 04, 2025 pm 03:49 PM

This guide demonstrates installing and managing multiple MySQL versions on macOS using Homebrew. It emphasizes using Homebrew to isolate installations, preventing conflicts. The article details installation, starting/stopping services, and best pra

What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?What are some popular MySQL GUI tools (e.g., MySQL Workbench, phpMyAdmin)?Mar 21, 2025 pm 06:28 PM

Article discusses popular MySQL GUI tools like MySQL Workbench and phpMyAdmin, comparing their features and suitability for beginners and advanced users.[159 characters]

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months agoBy尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

Safe Exam Browser

Safe Exam Browser

Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)