使用Opatch工具应用过渡性Patch
使用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调用安装,示范如下:
Interim Patch ID: 2990321Bugs 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 > YBacking-up files before patching.Applying patch 2990321.Patching /opt/oracle/product/9.2.0/lib/libagent9.awith hodmp.o.Patching /opt/oracle/product/9.2.0/lib/libagent9.awith homt.o.Patching /opt/oracle/product/9.2.0/lib/libagent9.awith horcr.o.Running make for client_sharedlib.ar: creating /opt/oracle/product/9.2.0/lib/libclntst9.aar: creating /opt/oracle/product/9.2.0/lib32/libclntst9.aRunning 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$ ls2990321 README.txt opatch opatch.plDocumentation jlib opatch.bat opatch_modulesbash-2.03$ opatchPERL5LIB=/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 lsinventoryPERL5LIB=/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 lsinventoryUsing oraInst.loc to look up oui libs...Parsing /opt/oracle/oraInventory/ContentsXML/comps.xmlFound "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.0inventory_location = /opt/oracle/oraInventoryliboraInstaller_lib= /opt/oracle/oui/bin/solaris/liboraInstaller.sopath_to_java = /opt/oracle/jre/1.3.1/bin/javapath_to_oI_loc = /var/opt/oracle/oraInst.locoui_component_loc = /opt/oracle/ouirequired_jar_file under oui = lib/OraInstaller.jarRetrieving inventory.PRODUCT NAME VERSION============ =======Advanced Queueing (AQ) API Patch 9.2.0.4.0Advanced Queueing (AQ) API 9.2.0.1.0Advanced Replication Patch 9.2.0.4.0Advanced Replication 9.2.0.1.0Agent Required Support Files Patch 9.2.0.4.0Agent Required Support Files 9.2.0.1.0Apache Configuration for Oracle Java Server Pages 1.1.2.3.0Apache Configuration for Oracle XML Developer's Kit 9.2.0.1.0Apache JServ 1.1.0.0.0gApache Web Server files 1.3.22.0.0aAssistant Common Files Patch 9.2.0.4.0Assistant Common Files 9.2.0.1.0Authentication and Encryption 32-bit 9.2.0.1.0Authentication and Encryption 32-bit 9.2.0.4.0Authentication and Encryption Patch 9.2.0.4.0Authentication and Encryption 9.2.0.1.0Bali Share 1.1.17.0.0BC4J Runtime for Database 9.0.2.692.1Capacity Planner 9.2.0.1.0Change Management Common Files 9.2.0.1.0Character Set Migration Utility 9.2.0.1.0Character Set Migration Utility 9.2.0.4.0Data Management Services Common Files Patch 9.2.0.4.0Data Management Services Common Files 9.2.0.1.0Database Configuration Assistant 9.2.0.1.0Database SQL Scripts Patch 9.2.0.4.0Database SQL Scripts 9.2.0.1.0Database Upgrade Assistant 9.2.0.1.0Database Verify Utility Patch 9.2.0.4.0Database Verify Utility 9.2.0.1.0Database Workspace Manager 9.2.0.1.0DBJAVA Required Support Files Patch 9.2.0.4.0DBJAVA Required Support Files 9.2.0.1.0Documentaion Required Support Files 9.2.0.1.0Enterprise Edition Options 9.2.0.1.0Enterprise Login Assistant 9.2.0.1.0Enterprise Manage Website Translated Files 9.2.0.1.0Enterprise Manager Base Classes 9.2.0.1.0Enterprise Manager Client 9.2.0.1.0Enterprise Manager Common Files 9.2.0.1.0Enterprise Manager Console 9.2.0.1.0Enterprise Manager Database Applications 9.2.0.1.0Enterprise Manager Events 9.2.0.1.0Enterprise Manager Installation Prerequisite Checks 9.2.0.1.0Enterprise Manager Integrated Applications 9.2.0.1.0Enterprise Manager Minimal Integration 9.2.0.1.0Enterprise Manager Paging and OMS Common Files 9.2.0.1.0Enterprise Manager Quick Tours 9.2.0.1.0Enterprise Manager Translated Files 9.2.0.1.0Enterprise Manager Web Site 9.2.0.1.0Enterprise Manager Webserver Integration 9.2.0.1.0Export/Import Patch 9.2.0.4.0Export/Import 9.2.0.1.0External Naming: NIS Patch 9.2.0.4.0External Naming: NIS 9.2.0.1.0Generic Connectivity Common Files Patch 9.2.0.4.0Generic Connectivity Common Files 9.2.0.1.0Generic Connectivity Using ODBC Patch 9.2.0.4.0Generic Connectivity Using ODBC 9.2.0.1.0Installation Common Files Patch 9.2.0.4.0Installation Common Files 9.2.0.1.0iSQL*Plus Patch 9.2.0.4.0iSQL*Plus 9.2.0.1.0JDBC Common Files Patch 9.2.0.4.0JDBC Common Files 9.2.0.1.0JDBC/OCI Common Files Patch 9.2.0.4.0JDBC/OCI Common Files 9.2.0.1.0JSDK 2.0.0.0.0dLDAP Required Support Files Patch 9.2.0.4.0LDAP Required Support Files 9.2.0.1.0Legato Networker Single Server 6.1.0.0.0Migration Utility Patch 9.2.0.4.0Migration Utility 9.2.0.1.0New Database ID Patch 9.2.0.4.0New Database ID 9.2.0.1.0Object Type Translator Patch 9.2.0.4.0Object Type Translator 9.2.0.1.0Oracle 9iR2 Patchset 9.2.0.4.0Oracle Advanced Security 9.2.0.1.0Oracle Applications Extensions Patch 9.2.0.4.0Oracle Applications Extensions 9.2.0.1.0Oracle C++ Call Interface Patch 9.2.0.4.0Oracle C++ Call Interface 9.2.0.1.0Oracle Caching Service for Java 2.1.0.0.0aOracle Call Interface (OCI) Patch 9.2.0.4.0Oracle Call Interface (OCI) 9.2.0.1.0Oracle Change Management Pack 9.2.0.1.0Oracle Client Required Support Files Patch 9.2.0.4.0Oracle Client Required Support Files 9.2.0.1.0Oracle Code Editor 1.2.1.0.0AOracle Common Schema Demos Patch 9.2.0.4.0Oracle Common Schema Demos 9.2.0.1.0Oracle Complete DSS Starter Database 9.2.0.1.0Oracle Complete OLTP Starter Database 9.2.0.1.0Oracle Core Required Support Files Patch 9.2.0.4.0Oracle Core Required Support Files 9.2.0.1.0Oracle Data Mining Patch 9.2.0.4.0Oracle Data Mining 9.2.0.1.0Oracle Database Demos Patch 9.2.0.4.0Oracle Database Demos 9.2.0.1.0Oracle Database User Interface 2.2.11.0.0Oracle Database Utilities Patch 9.2.0.4.0Oracle Database Utilities 9.2.0.1.0Oracle Developer Server Forms Manager 9.2.0.1.0Oracle Diagnostics Pack 9.2.0.1.0Oracle Display Fonts 9.0.2.0.0Oracle Dynamic Services Server 9.2.0.1.0Oracle eBusiness Management Extensions Patch 9.2.0.4.0Oracle eBusiness Management Extensions 9.2.0.1.0Oracle EMD Agent Extensions Patch 9.2.0.4.0Oracle EMD Agent Extensions 9.2.0.1.0Oracle Enterprise Manager Products 9.2.0.1.0Oracle Extended Windowing Toolkit 3.4.13.0.0Oracle Forms Extensions 9.2.0.1.0Oracle Help For Java 3.2.13.0.0Oracle Help For Java 4.1.13.0.0Oracle Help for the Web 1.0.7.0.0Oracle HTTP Server Extensions 9.2.0.1.0Oracle HTTP Server 9.2.0.1.0Oracle Ice Browser 5.06.8.0.0Oracle Intelligent Agent Base Component Files Patch 9.2.0.4.0Oracle Intelligent Agent Base Component Files 9.2.0.1.0Oracle Intelligent Agent Config Tool 9.2.0.1.0Oracle Intelligent Agent Extensions 9.2.0.1.0Oracle Intelligent Agent 9.2.0.1.0Oracle interMedia Annotator 9.2.0.1.0Oracle interMedia Audio 9.2.0.1.0Oracle interMedia Audio 9.2.0.4.0Oracle interMedia Client Compatibility Files Patch 9.2.0.4.0Oracle interMedia Client Compatibility Files 9.2.0.1.0Oracle interMedia Client Demos Patch 9.2.0.4.0Oracle interMedia Client Demos 9.2.0.1.0Oracle interMedia Client Option 9.2.0.1.0Oracle interMedia Common Files Patch 9.2.0.4.0Oracle interMedia Common Files 9.2.0.1.0Oracle interMedia Image 9.2.0.1.0Oracle interMedia Image 9.2.0.4.0Oracle interMedia Java Advanced Imaging Patch 9.2.0.4.0Oracle interMedia Java Advanced Imaging 9.2.0.1.0Oracle interMedia Java Client 9.2.0.1.0Oracle interMedia Java Media Framework Client 9.2.0.1.0Oracle interMedia Locator Patch 9.2.0.4.0Oracle interMedia Locator 9.2.0.1.0Oracle interMedia Video 9.2.0.1.0Oracle interMedia Video 9.2.0.4.0Oracle interMedia Web Client 9.2.0.1.0Oracle interMedia 9.2.0.1.0Oracle Internet Directory Client Common Files Patch 9.2.0.4.0Oracle Internet Directory Client Common Files 9.2.0.1.0Oracle Internet Directory Client Patch 9.2.0.4.0Oracle Internet Directory Client 9.2.0.1.0Oracle Internet Directory Tools 9.2.0.1.0Oracle Java Core Patch 9.2.0.4.0Oracle Java Layout Engine 2.0.1.0.0Oracle Java Server Pages 1.1.3.1.0Oracle Java Tools Patch 9.2.0.4.0Oracle Java Tools 9.2.0.1.0Oracle JDBC Thin Driver for JDK 1.1 Patch 9.2.0.4.0Oracle JDBC Thin Driver for JDK 1.1 9.2.0.1.0Oracle JDBC Thin Driver for JDK 1.2 Patch 9.2.0.4.0Oracle JDBC Thin Driver for JDK 1.2 9.2.0.1.0Oracle JDBC Thin Driver for JDK 1.4 Patch 9.2.0.4.0Oracle JDBC Thin Driver for JDK 1.4 9.2.0.1.0Oracle JDBC/OCI Driver for JDK 1.1 9.2.0.1.0Oracle JDBC/OCI Driver for JDK 1.2 9.2.0.1.0Oracle JFC Extended Windowing Toolkit 4.1.10.0.0Oracle JVM Patch 9.2.0.4.0Oracle JVM 9.2.0.1.0Oracle Management Pack for Oracle Applications 9.2.0.1.0Oracle Management Server 9.2.0.1.0Oracle Message Gateway Common Files 9.2.0.1.0Oracle Mod PL/SQL Gateway 3.0.9.8.3bOracle Net Configuration Assistant Patch 9.2.0.4.0Oracle Net Configuration Assistant 9.2.0.1.0Oracle Net Listener Patch 9.2.0.4.0Oracle Net Listener 9.2.0.1.0Oracle Net Manager Patch 9.2.0.4.0Oracle Net Manager 9.2.0.1.0Oracle Net Patch 9.2.0.4.0Oracle Net Required Support Files Patch 9.2.0.4.0Oracle Net Required Support Files 9.2.0.1.0Oracle Net Services 9.2.0.1.0Oracle Net 9.2.0.1.0Oracle OLAP API Patch 9.2.0.4.0Oracle OLAP API 9.2.0.1.0Oracle OLAP Cube Viewer 9.2.0.1.0Oracle OLAP CWM Lite Patch 9.2.0.4.0Oracle OLAP CWM Lite 9.2.0.1.0Oracle OLAP Patch 9.2.0.4.0Oracle OLAP Worksheet 9.2.0.1.0Oracle OLAP 9.2.0.1.0Oracle Partitioning Patch 9.2.0.4.0Oracle Partitioning 9.2.0.1.0Oracle Perl Interpreter 5.00503.0.0.0cOracle Programmer 9.2.0.1.0Oracle Required Support Files 32 bit 9.2.0.1.0Oracle Required Support Files 64 bit Patch 9.2.0.4.0Oracle SOAP Client 2.0.0.0.0aOracle SOAP for JServ 2.0.0.0.0aOracle SOAP Server 2.0.0.0.0aOracle Spatial Patch 9.2.0.4.0Oracle Spatial 9.2.0.1.0Oracle SQLJ Patch 9.2.0.4.0Oracle SQLJ 9.2.0.1.0Oracle Starter Database 9.2.0.1.0Oracle Text Patch 9.2.0.4.0Oracle Text 9.2.0.1.0Oracle Trace Patch 9.2.0.4.0Oracle Trace Required Support Files Patch 9.2.0.4.0Oracle Trace Required Support Files 9.2.0.1.0Oracle Trace 9.2.0.1.0Oracle Transparent Gateways 9.2.0.1.0Oracle Tuning Pack 9.2.0.1.0Oracle UIX 2.0.20.0.0Oracle Ultra Search Common Files Patch 9.2.0.4.0Oracle Ultra Search Common Files 9.2.0.1.0Oracle Ultra Search Middle-Tier Patch 9.2.0.4.0Oracle Ultra Search Middle-Tier 9.2.0.1.0Oracle Ultra Search Server Patch 9.2.0.4.0Oracle Ultra Search Server 9.2.0.1.0Oracle Wallet Manager Patch 9.2.0.4.0Oracle Wallet Manager 9.2.0.1.0Oracle Workflow Manager 9.2.0.1.0Oracle XML Developer's Kit Patch 9.2.0.4.0Oracle XML Developer's Kit 9.2.0.1.0Oracle XML Runtime Components 9.2.0.1.0Oracle XML SQL Utility Patch 9.2.0.4.0Oracle XML SQL Utility 9.2.0.1.0Oracle9i Database 9.2.0.1.0Oracle9i Development Kit 9.2.0.1.0Oracle9i for UNIX Documentation 9.2.0.1.0Oracle9i Globalization Support Patch 9.2.0.4.0Oracle9i Globalization Support 9.2.0.1.0Oracle9i Patch 9.2.0.4.0Oracle9i Server 32 bit 9.2.0.1.0Oracle9i Server 64 bit Patch 9.2.0.4.0Oracle9i Syndication Server 9.2.0.1.0Oracle9i 9.2.0.1.0Parser Generator Required Support Files 9.2.0.1.0Performance Manager 9.2.0.1.0PL/SQL Embedded Gateway 9.2.0.1.0PL/SQL Patch 9.2.0.4.0PL/SQL Required Support Files Patch 9.2.0.4.0PL/SQL Required Support Files 9.2.0.1.0PL/SQL 9.2.0.1.0Platform Required Support Files 9.2.0.1.0Precompiler Common Files Patch 9.2.0.4.0Precompiler Common Files 9.2.0.1.0Precompiler Required Support Files Patch 9.2.0.4.0Precompiler Required Support Files 9.2.0.1.0Pro*C/C++ Patch 9.2.0.4.0Pro*C/C++ 9.2.0.1.0Pro*COBOL Patch 1.8.77.4.0Pro*COBOL Patch 9.2.0.4.0Pro*COBOL 1.8.77.0.0Pro*COBOL 9.2.0.1.0Pro*FORTRAN Patch 1.8.77.4.0Pro*FORTRAN 1.8.77.0.0RDBMS Required Support Files Patch 9.2.0.4.0RDBMS Required Support Files 9.2.0.1.0Recovery Manager Patch 9.2.0.4.0Recovery Manager 9.2.0.1.0regexp 2.0.20.0.0Reporting Framework 9.2.0.1.0Required Support Files 9.2.0.1.0Secure Socket Layer Patch 9.2.0.4.0Secure Socket Layer 9.2.0.1.0SQL*Loader Patch 9.2.0.4.0SQL*Loader 9.2.0.1.0SQL*Plus Patch 9.2.0.4.0SQL*Plus Required Support Files Patch 9.2.0.4.0SQL*Plus Required Support Files 9.2.0.1.0SQL*Plus 9.2.0.1.0SQLJ Runtime Patch 9.2.0.4.0SQLJ Runtime 9.2.0.1.0SQLJ Translator 9.2.0.1.0SQLServer Monitoring Option 9.2.0.1.0SSL Required Support Files Patch 9.2.0.4.0SSL Required Support Files 9.2.0.1.0Sun JDK extensions 9.2.0.1.0Sun JDK 1.3.1.0.1aUtilities Common Files Patch 9.2.0.4.0Utilities Common Files 9.2.0.1.0Visigenics ORB 3.4.0.0.0XDK Required Support Files Patch 9.2.0.4.0XDK Required Support Files 9.2.0.1.0XML Class Generator for C++ 9.2.0.1.0XML Class Generator for C++ 9.2.0.4.0XML Class Generator for Java 9.2.0.1.0XML Class Generator for Java 9.2.0.4.0XML Parser for C Patch 9.2.0.4.0XML Parser for C++ Patch 9.2.0.4.0XML Parser for C++ 9.2.0.1.0XML Parser for C 9.2.0.1.0XML Parser for Java Patch 9.2.0.4.0XML Parser for Java 9.2.0.1.0XML Parser for Oracle JVM Patch 9.2.0.4.0XML Parser for Oracle JVM 9.2.0.1.0XML Parser for PL/SQL Patch 9.2.0.4.0XML Parser for PL/SQL 9.2.0.1.0XML Transviewer Beans 9.2.0.1.0XML Transviewer Beans 9.2.0.4.0XML Transx 9.2.0.1.0XML Transx 9.2.0.4.0XML 9.2.0.1.0XML 9.2.0.4.0XSQL Servlet 9.2.0.1.0XSQL Servlet 9.2.0.4.0OPatch succedded.
使用opatch的rollback选项,还可以回滚某个临时补丁,不再具体说明。
本文作者:
eygle,Oracle技术关注者,来自中国最大的Oracle技术论坛itpub.
www.eygle.com是作者的个人站点.你可通过Guoqiang.Gai@gmail.com来联系作者.欢迎技术探讨交流以及链接交换.
原文出处:
http://www.eygle.com/internal/Use.Opatch.apply.Interim.Patch.htm