Home Database Mysql Tutorial Oracle 更新 OPatch 工具版本 的方法 说明

Oracle 更新 OPatch 工具版本 的方法 说明

Jun 07, 2016 pm 05:05 PM

从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 of this Website
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

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 ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

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.

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]

How do you handle large datasets in MySQL? How do you handle large datasets in MySQL? Mar 21, 2025 pm 12:15 PM

Article discusses strategies for handling large datasets in MySQL, including partitioning, sharding, indexing, and query optimization.

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]

How do you drop a table in MySQL using the DROP TABLE statement? How do you drop a table in MySQL using the DROP TABLE statement? Mar 19, 2025 pm 03:52 PM

The article discusses dropping tables in MySQL using the DROP TABLE statement, emphasizing precautions and risks. It highlights that the action is irreversible without backups, detailing recovery methods and potential production environment hazards.

How do you create indexes on JSON columns? How do you create indexes on JSON columns? Mar 21, 2025 pm 12:13 PM

The article discusses creating indexes on JSON columns in various databases like PostgreSQL, MySQL, and MongoDB to enhance query performance. It explains the syntax and benefits of indexing specific JSON paths, and lists supported database systems.

How do you represent relationships using foreign keys? How do you represent relationships using foreign keys? Mar 19, 2025 pm 03:48 PM

Article discusses using foreign keys to represent relationships in databases, focusing on best practices, data integrity, and common pitfalls to avoid.

How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)? How do I secure MySQL against common vulnerabilities (SQL injection, brute-force attacks)? Mar 18, 2025 pm 12:00 PM

Article discusses securing MySQL against SQL injection and brute-force attacks using prepared statements, input validation, and strong password policies.(159 characters)

See all articles