使用Opatch工具应用过渡性Patch

Last Updated: Saturday, 2004-12-04 10:04 Eygle


|

很多时候,在推出一个完整的补丁集之前,Oracle会依据Bug的严重程度发布一些过渡性或临时性Patch,修正一些Bug。
这些Patch通常没有setup安装程序,需要使用Oracle的opatch工具安装,本文就opatch的使用进行示范说明。

1.下载

Opatch的最新版本可以从Metalink下载,参考 Note:224346.1

2.使用

在NT/UNIX,Opatch都需要perl支持,所以,使用之前确认你安装了perl环境支持。

把下载的patch解压后,可以使用opatch调用安装,示范如下:

|

> > $ opatch apply 2990321 > PERL5LIB=/opt/oracle/product/9.2.0/Apache/perl/lib/5.00503:./opatch_modules; export PERL5LIB > /opt/oracle/product/9.2.0/Apache/perl/bin/perl ./opatch.pl apply 2990321 >
>
> OPatch Version 1.0.0.0.43 > Perl Version 5.00503 >
>
> Performing pre-patch installation checks. >
> general_options is set to 0 >
> Using oraInst.loc to look up oui libs... >
> Parsing /opt/oracle/oraInventory/ContentsXML/comps.xml >
> Found "oracle.swd.oui" version "2.2.0.12.0" > on "/opt/oracle/oui" >
> Found JRE version "1.3.1.0.0a" > on "/opt/oracle/jre/1.3.1/bin/java" >
> Oracle Home = /opt/oracle/product/9.2.0 > inventory_location = /opt/oracle/oraInventory > liboraInstaller_lib= /opt/oracle/oui/bin/solaris/liboraInstaller.so > path_to_java = /opt/oracle/jre/1.3.1/bin/java > path_to_oI_loc = /var/opt/oracle/oraInst.loc > oui_component_loc = /opt/oracle/oui > required_jar_file under oui = lib/OraInstaller.jar >
> Checking if this is a RAC system... >
> This is not a RAC system >
> Component Name: oracle.rdbms > Component Ver.: 9.2.0.3.0 >
> Interim Patch ID: 2990321 > Bugs fixed by this patch: > 2716764 2988114 > ---Patch号,及修正的bug说明 >
> Please shut down Oracle instances on this system > (Oracle Home = /opt/oracle/product/9.2.0) > Is this system ready for updating (are the instances down)? > Please respond Y|N > Y > Backing-up files before patching. >
> Applying patch 2990321. >
> Patching /opt/oracle/product/9.2.0/lib/libagent9.a > with hodmp.o. >
> Patching /opt/oracle/product/9.2.0/lib/libagent9.a > with homt.o. >
> Patching /opt/oracle/product/9.2.0/lib/libagent9.a > with horcr.o. >
> Running make for client_sharedlib. >
> ar: creating /opt/oracle/product/9.2.0/lib/libclntst9.a > ar: creating /opt/oracle/product/9.2.0/lib32/libclntst9.a > Running make for iextproc. >
> Performing post-patch inventory update and removing working files. >
> Patch 2990321 has been applied successfully. >
> Updating inventory... >
> OPatch succedded. >


3.通过opatch查看数据库各组件版本

> > cbash-2.03$ cd OPatch/ > bash-2.03$ ls > 2990321 README.txt opatch opatch.pl > Documentation jlib opatch.bat opatch_modules > bash-2.03$ opatch > PERL5LIB=/opt/oracle/product/9.2.0/Apache/perl/lib/5.00503:./opatch_modules; export PERL5LIB > /opt/oracle/product/9.2.0/Apache/perl/bin/perl ./opatch.pl >
> Usage: opatch [ -h[elp] ] [ -r[eport] ] [ command ] >
> command := apply > attach > lsinventory > query > rollback > version >
> := -help Displays the help message for the command. > -report Print the actions without executing (deprecated). >
>
>
>
> ERROR: OPatch failed because of cmd. args. problem. >
>
> bash-2.03$ opatch lsinventory > PERL5LIB=/opt/oracle/product/9.2.0/Apache/perl/lib/5.00503:./opatch_modules; export PERL5LIB > /opt/oracle/product/9.2.0/Apache/perl/bin/perl ./opatch.pl lsinventory > Using oraInst.loc to look up oui libs... >
> Parsing /opt/oracle/oraInventory/ContentsXML/comps.xml >
> Found "oracle.swd.oui" version "2.2.0.18.0" > on "/opt/oracle/oui" >
> Found JRE version "1.3.1.0.0a" > on "/opt/oracle/jre/1.3.1/bin/java" >
> Oracle Home = /opt/oracle/product/9.2.0 > inventory_location = /opt/oracle/oraInventory > liboraInstaller_lib= /opt/oracle/oui/bin/solaris/liboraInstaller.so > path_to_java = /opt/oracle/jre/1.3.1/bin/java > path_to_oI_loc = /var/opt/oracle/oraInst.loc > oui_component_loc = /opt/oracle/oui > required_jar_file under oui = lib/OraInstaller.jar >
> Retrieving inventory. >
> PRODUCT NAME VERSION >
> ============ ======= >
> Advanced Queueing (AQ) API Patch 9.2.0.4.0 > Advanced Queueing (AQ) API 9.2.0.1.0 > Advanced Replication Patch 9.2.0.4.0 > Advanced Replication 9.2.0.1.0 > Agent Required Support Files Patch 9.2.0.4.0 > Agent Required Support Files 9.2.0.1.0 > Apache Configuration for Oracle Java Server Pages 1.1.2.3.0 > Apache Configuration for Oracle XML Developer's Kit 9.2.0.1.0 > Apache JServ 1.1.0.0.0g > Apache Web Server files 1.3.22.0.0a > Assistant Common Files Patch 9.2.0.4.0 > Assistant Common Files 9.2.0.1.0 > Authentication and Encryption 32-bit 9.2.0.1.0 > Authentication and Encryption 32-bit 9.2.0.4.0 > Authentication and Encryption Patch 9.2.0.4.0 > Authentication and Encryption 9.2.0.1.0 > Bali Share 1.1.17.0.0 > BC4J Runtime for Database 9.0.2.692.1 > Capacity Planner 9.2.0.1.0 > Change Management Common Files 9.2.0.1.0 > Character Set Migration Utility 9.2.0.1.0 > Character Set Migration Utility 9.2.0.4.0 > Data Management Services Common Files Patch 9.2.0.4.0 > Data Management Services Common Files 9.2.0.1.0 > Database Configuration Assistant 9.2.0.1.0 > Database SQL Scripts Patch 9.2.0.4.0 > Database SQL Scripts 9.2.0.1.0 > Database Upgrade Assistant 9.2.0.1.0 > Database Verify Utility Patch 9.2.0.4.0 > Database Verify Utility 9.2.0.1.0 > Database Workspace Manager 9.2.0.1.0 > DBJAVA Required Support Files Patch 9.2.0.4.0 > DBJAVA Required Support Files 9.2.0.1.0 > Documentaion Required Support Files 9.2.0.1.0 > Enterprise Edition Options 9.2.0.1.0 > Enterprise Login Assistant 9.2.0.1.0 > Enterprise Manage Website Translated Files 9.2.0.1.0 > Enterprise Manager Base Classes 9.2.0.1.0 > Enterprise Manager Client 9.2.0.1.0 > Enterprise Manager Common Files 9.2.0.1.0 > Enterprise Manager Console 9.2.0.1.0 > Enterprise Manager Database Applications 9.2.0.1.0 > Enterprise Manager Events 9.2.0.1.0 > Enterprise Manager Installation Prerequisite Checks 9.2.0.1.0 > Enterprise Manager Integrated Applications 9.2.0.1.0 > Enterprise Manager Minimal Integration 9.2.0.1.0 > Enterprise Manager Paging and OMS Common Files 9.2.0.1.0 > Enterprise Manager Quick Tours 9.2.0.1.0 > Enterprise Manager Translated Files 9.2.0.1.0 > Enterprise Manager Web Site 9.2.0.1.0 > Enterprise Manager Webserver Integration 9.2.0.1.0 > Export/Import Patch 9.2.0.4.0 > Export/Import 9.2.0.1.0 > External Naming: NIS Patch 9.2.0.4.0 > External Naming: NIS 9.2.0.1.0 > Generic Connectivity Common Files Patch 9.2.0.4.0 > Generic Connectivity Common Files 9.2.0.1.0 > Generic Connectivity Using ODBC Patch 9.2.0.4.0 > Generic Connectivity Using ODBC 9.2.0.1.0 > Installation Common Files Patch 9.2.0.4.0 > Installation Common Files 9.2.0.1.0 > iSQLPlus Patch 9.2.0.4.0 > iSQLPlus 9.2.0.1.0 > JDBC Common Files Patch 9.2.0.4.0 > JDBC Common Files 9.2.0.1.0 > JDBC/OCI Common Files Patch 9.2.0.4.0 > JDBC/OCI Common Files 9.2.0.1.0 > JSDK 2.0.0.0.0d > LDAP Required Support Files Patch 9.2.0.4.0 > LDAP Required Support Files 9.2.0.1.0 > Legato Networker Single Server 6.1.0.0.0 > Migration Utility Patch 9.2.0.4.0 > Migration Utility 9.2.0.1.0 > New Database ID Patch 9.2.0.4.0 > New Database ID 9.2.0.1.0 > Object Type Translator Patch 9.2.0.4.0 > Object Type Translator 9.2.0.1.0 > Oracle 9iR2 Patchset 9.2.0.4.0 > Oracle Advanced Security 9.2.0.1.0 > Oracle Applications Extensions Patch 9.2.0.4.0 > Oracle Applications Extensions 9.2.0.1.0 > Oracle C++ Call Interface Patch 9.2.0.4.0 > Oracle C++ Call Interface 9.2.0.1.0 > Oracle Caching Service for Java 2.1.0.0.0a > Oracle Call Interface (OCI) Patch 9.2.0.4.0 > Oracle Call Interface (OCI) 9.2.0.1.0 > Oracle Change Management Pack 9.2.0.1.0 > Oracle Client Required Support Files Patch 9.2.0.4.0 > Oracle Client Required Support Files 9.2.0.1.0 > Oracle Code Editor 1.2.1.0.0A > Oracle Common Schema Demos Patch 9.2.0.4.0 > Oracle Common Schema Demos 9.2.0.1.0 > Oracle Complete DSS Starter Database 9.2.0.1.0 > Oracle Complete OLTP Starter Database 9.2.0.1.0 > Oracle Core Required Support Files Patch 9.2.0.4.0 > Oracle Core Required Support Files 9.2.0.1.0 > Oracle Data Mining Patch 9.2.0.4.0 > Oracle Data Mining 9.2.0.1.0 > Oracle Database Demos Patch 9.2.0.4.0 > Oracle Database Demos 9.2.0.1.0 > Oracle Database User Interface 2.2.11.0.0 > Oracle Database Utilities Patch 9.2.0.4.0 > Oracle Database Utilities 9.2.0.1.0 > Oracle Developer Server Forms Manager 9.2.0.1.0 > Oracle Diagnostics Pack 9.2.0.1.0 > Oracle Display Fonts 9.0.2.0.0 > Oracle Dynamic Services Server 9.2.0.1.0 > Oracle eBusiness Management Extensions Patch 9.2.0.4.0 > Oracle eBusiness Management Extensions 9.2.0.1.0 > Oracle EMD Agent Extensions Patch 9.2.0.4.0 > Oracle EMD Agent Extensions 9.2.0.1.0 > Oracle Enterprise Manager Products 9.2.0.1.0 > Oracle Extended Windowing Toolkit 3.4.13.0.0 > Oracle Forms Extensions 9.2.0.1.0 > Oracle Help For Java 3.2.13.0.0 > Oracle Help For Java 4.1.13.0.0 > Oracle Help for the Web 1.0.7.0.0 > Oracle HTTP Server Extensions 9.2.0.1.0 > Oracle HTTP Server 9.2.0.1.0 > Oracle Ice Browser 5.06.8.0.0 > Oracle Intelligent Agent Base Component Files Patch 9.2.0.4.0 > Oracle Intelligent Agent Base Component Files 9.2.0.1.0 > Oracle Intelligent Agent Config Tool 9.2.0.1.0 > Oracle Intelligent Agent Extensions 9.2.0.1.0 > Oracle Intelligent Agent 9.2.0.1.0 > Oracle interMedia Annotator 9.2.0.1.0 > Oracle interMedia Audio 9.2.0.1.0 > Oracle interMedia Audio 9.2.0.4.0 > Oracle interMedia Client Compatibility Files Patch 9.2.0.4.0 > Oracle interMedia Client Compatibility Files 9.2.0.1.0 > Oracle interMedia Client Demos Patch 9.2.0.4.0 > Oracle interMedia Client Demos 9.2.0.1.0 > Oracle interMedia Client Option 9.2.0.1.0 > Oracle interMedia Common Files Patch 9.2.0.4.0 > Oracle interMedia Common Files 9.2.0.1.0 > Oracle interMedia Image 9.2.0.1.0 > Oracle interMedia Image 9.2.0.4.0 > Oracle interMedia Java Advanced Imaging Patch 9.2.0.4.0 > Oracle interMedia Java Advanced Imaging 9.2.0.1.0 > Oracle interMedia Java Client 9.2.0.1.0 > Oracle interMedia Java Media Framework Client 9.2.0.1.0 > Oracle interMedia Locator Patch 9.2.0.4.0 > Oracle interMedia Locator 9.2.0.1.0 > Oracle interMedia Video 9.2.0.1.0 > Oracle interMedia Video 9.2.0.4.0 > Oracle interMedia Web Client 9.2.0.1.0 > Oracle interMedia 9.2.0.1.0 > Oracle Internet Directory Client Common Files Patch 9.2.0.4.0 > Oracle Internet Directory Client Common Files 9.2.0.1.0 > Oracle Internet Directory Client Patch 9.2.0.4.0 > Oracle Internet Directory Client 9.2.0.1.0 > Oracle Internet Directory Tools 9.2.0.1.0 > Oracle Java Core Patch 9.2.0.4.0 > Oracle Java Layout Engine 2.0.1.0.0 > Oracle Java Server Pages 1.1.3.1.0 > Oracle Java Tools Patch 9.2.0.4.0 > Oracle Java Tools 9.2.0.1.0 > Oracle JDBC Thin Driver for JDK 1.1 Patch 9.2.0.4.0 > Oracle JDBC Thin Driver for JDK 1.1 9.2.0.1.0 > Oracle JDBC Thin Driver for JDK 1.2 Patch 9.2.0.4.0 > Oracle JDBC Thin Driver for JDK 1.2 9.2.0.1.0 > Oracle JDBC Thin Driver for JDK 1.4 Patch 9.2.0.4.0 > Oracle JDBC Thin Driver for JDK 1.4 9.2.0.1.0 > Oracle JDBC/OCI Driver for JDK 1.1 9.2.0.1.0 > Oracle JDBC/OCI Driver for JDK 1.2 9.2.0.1.0 > Oracle JFC Extended Windowing Toolkit 4.1.10.0.0 > Oracle JVM Patch 9.2.0.4.0 > Oracle JVM 9.2.0.1.0 > Oracle Management Pack for Oracle Applications 9.2.0.1.0 > Oracle Management Server 9.2.0.1.0 > Oracle Message Gateway Common Files 9.2.0.1.0 > Oracle Mod PL/SQL Gateway 3.0.9.8.3b > Oracle Net Configuration Assistant Patch 9.2.0.4.0 > Oracle Net Configuration Assistant 9.2.0.1.0 > Oracle Net Listener Patch 9.2.0.4.0 > Oracle Net Listener 9.2.0.1.0 > Oracle Net Manager Patch 9.2.0.4.0 > Oracle Net Manager 9.2.0.1.0 > Oracle Net Patch 9.2.0.4.0 > Oracle Net Required Support Files Patch 9.2.0.4.0 > Oracle Net Required Support Files 9.2.0.1.0 > Oracle Net Services 9.2.0.1.0 > Oracle Net 9.2.0.1.0 > Oracle OLAP API Patch 9.2.0.4.0 > Oracle OLAP API 9.2.0.1.0 > Oracle OLAP Cube Viewer 9.2.0.1.0 > Oracle OLAP CWM Lite Patch 9.2.0.4.0 > Oracle OLAP CWM Lite 9.2.0.1.0 > Oracle OLAP Patch 9.2.0.4.0 > Oracle OLAP Worksheet 9.2.0.1.0 > Oracle OLAP 9.2.0.1.0 > Oracle Partitioning Patch 9.2.0.4.0 > Oracle Partitioning 9.2.0.1.0 > Oracle Perl Interpreter 5.00503.0.0.0c > Oracle Programmer 9.2.0.1.0 > Oracle Required Support Files 32 bit 9.2.0.1.0 > Oracle Required Support Files 64 bit Patch 9.2.0.4.0 > Oracle SOAP Client 2.0.0.0.0a > Oracle SOAP for JServ 2.0.0.0.0a > Oracle SOAP Server 2.0.0.0.0a > Oracle Spatial Patch 9.2.0.4.0 > Oracle Spatial 9.2.0.1.0 > Oracle SQLJ Patch 9.2.0.4.0 > Oracle SQLJ 9.2.0.1.0 > Oracle Starter Database 9.2.0.1.0 > Oracle Text Patch 9.2.0.4.0 > Oracle Text 9.2.0.1.0 > Oracle Trace Patch 9.2.0.4.0 > Oracle Trace Required Support Files Patch 9.2.0.4.0 > Oracle Trace Required Support Files 9.2.0.1.0 > Oracle Trace 9.2.0.1.0 > Oracle Transparent Gateways 9.2.0.1.0 > Oracle Tuning Pack 9.2.0.1.0 > Oracle UIX 2.0.20.0.0 > Oracle Ultra Search Common Files Patch 9.2.0.4.0 > Oracle Ultra Search Common Files 9.2.0.1.0 > Oracle Ultra Search Middle-Tier Patch 9.2.0.4.0 > Oracle Ultra Search Middle-Tier 9.2.0.1.0 > Oracle Ultra Search Server Patch 9.2.0.4.0 > Oracle Ultra Search Server 9.2.0.1.0 > Oracle Wallet Manager Patch 9.2.0.4.0 > Oracle Wallet Manager 9.2.0.1.0 > Oracle Workflow Manager 9.2.0.1.0 > Oracle XML Developer's Kit Patch 9.2.0.4.0 > Oracle XML Developer's Kit 9.2.0.1.0 > Oracle XML Runtime Components 9.2.0.1.0 > Oracle XML SQL Utility Patch 9.2.0.4.0 > Oracle XML SQL Utility 9.2.0.1.0 > Oracle9i Database 9.2.0.1.0 > Oracle9i Development Kit 9.2.0.1.0 > Oracle9i for UNIX Documentation 9.2.0.1.0 > Oracle9i Globalization Support Patch 9.2.0.4.0 > Oracle9i Globalization Support 9.2.0.1.0 > Oracle9i Patch 9.2.0.4.0 > Oracle9i Server 32 bit 9.2.0.1.0 > Oracle9i Server 64 bit Patch 9.2.0.4.0 > Oracle9i Syndication Server 9.2.0.1.0 > Oracle9i 9.2.0.1.0 > Parser Generator Required Support Files 9.2.0.1.0 > Performance Manager 9.2.0.1.0 > PL/SQL Embedded Gateway 9.2.0.1.0 > PL/SQL Patch 9.2.0.4.0 > PL/SQL Required Support Files Patch 9.2.0.4.0 > PL/SQL Required Support Files 9.2.0.1.0 > PL/SQL 9.2.0.1.0 > Platform Required Support Files 9.2.0.1.0 > Precompiler Common Files Patch 9.2.0.4.0 > Precompiler Common Files 9.2.0.1.0 > Precompiler Required Support Files Patch 9.2.0.4.0 > Precompiler Required Support Files 9.2.0.1.0 > ProC/C++ Patch 9.2.0.4.0 > ProC/C++ 9.2.0.1.0 > ProCOBOL Patch 1.8.77.4.0 > ProCOBOL Patch 9.2.0.4.0 > ProCOBOL 1.8.77.0.0 > ProCOBOL 9.2.0.1.0 > ProFORTRAN Patch 1.8.77.4.0 > ProFORTRAN 1.8.77.0.0 > RDBMS Required Support Files Patch 9.2.0.4.0 > RDBMS Required Support Files 9.2.0.1.0 > Recovery Manager Patch 9.2.0.4.0 > Recovery Manager 9.2.0.1.0 > regexp 2.0.20.0.0 > Reporting Framework 9.2.0.1.0 > Required Support Files 9.2.0.1.0 > Secure Socket Layer Patch 9.2.0.4.0 > Secure Socket Layer 9.2.0.1.0 > SQLLoader Patch 9.2.0.4.0 > SQLLoader 9.2.0.1.0 > SQLPlus Patch 9.2.0.4.0 > SQLPlus Required Support Files Patch 9.2.0.4.0 > SQLPlus Required Support Files 9.2.0.1.0 > SQLPlus 9.2.0.1.0 > SQLJ Runtime Patch 9.2.0.4.0 > SQLJ Runtime 9.2.0.1.0 > SQLJ Translator 9.2.0.1.0 > SQLServer Monitoring Option 9.2.0.1.0 > SSL Required Support Files Patch 9.2.0.4.0 > SSL Required Support Files 9.2.0.1.0 > Sun JDK extensions 9.2.0.1.0 > Sun JDK 1.3.1.0.1a > Utilities Common Files Patch 9.2.0.4.0 > Utilities Common Files 9.2.0.1.0 > Visigenics ORB 3.4.0.0.0 > XDK Required Support Files Patch 9.2.0.4.0 > XDK Required Support Files 9.2.0.1.0 > XML Class Generator for C++ 9.2.0.1.0 > XML Class Generator for C++ 9.2.0.4.0 > XML Class Generator for Java 9.2.0.1.0 > XML Class Generator for Java 9.2.0.4.0 > XML Parser for C Patch 9.2.0.4.0 > XML Parser for C++ Patch 9.2.0.4.0 > XML Parser for C++ 9.2.0.1.0 > XML Parser for C 9.2.0.1.0 > XML Parser for Java Patch 9.2.0.4.0 > XML Parser for Java 9.2.0.1.0 > XML Parser for Oracle JVM Patch 9.2.0.4.0 > XML Parser for Oracle JVM 9.2.0.1.0 > XML Parser for PL/SQL Patch 9.2.0.4.0 > XML Parser for PL/SQL 9.2.0.1.0 > XML Transviewer Beans 9.2.0.1.0 > XML Transviewer Beans 9.2.0.4.0 > XML Transx 9.2.0.1.0 > XML Transx 9.2.0.4.0 > XML 9.2.0.1.0 > XML 9.2.0.4.0 > XSQL Servlet 9.2.0.1.0 > XSQL Servlet 9.2.0.4.0 >
>
>
>
> OPatch succedded.


使用opatch的rollback选项,还可以回滚某个临时补丁,不再具体说明。

本文作者:
eygle,Oracle技术关注者,来自中国最大的Oracle技术论坛 itpub .
www.eygle.com 是作者的个人站点.你可通过 [email protected] 来联系作者.欢迎技术探讨交流以及链接交换.


原文出处:

http://www.eygle.com/internal/Use.Opatch.apply.Interim.Patch.htm


Published At
Categories with 数据库类
Tagged with
comments powered by Disqus