使用Opatch工具应用过渡性Patch
2024-07-21 02:13:27
供稿:网友
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 2990321perl5lib=/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 2990321opatch version 1.0.0.0.43perl version 5.00503performing pre-patch installation checks.general_options is set to 0using orainst.loc to look up oui libs...parsing /opt/oracle/orainventory/contentsxml/comps.xmlfound "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.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.jarchecking if this is a rac system...this is not a rac systemcomponent name: oracle.rdbmscomponent ver.: 9.2.0.3.0interim 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是作者的个人站点.你可通过[email protected]来联系作者.欢迎技术探讨交流以及链接交换.
原文出处:
http://www.eygle.com/internal/use.opatch.apply.interim.patch.htm