oracle如何查看 已经打过的补丁
来源: www.ixdba.net 作者: IXDBA.NET社区
set ORACLE_HOME=[oracle目录]
cd $ORACLE_HOME/Opatch/
opatch lsinventory -all -detail
[删除补丁] 删除这个补丁 opatch rollback -id [patchID]
如果没有安装opatch工具,需要先安装。上传文件p2617419_10102_GENERIC.zip
解压到oracle目录下:
unzip p2617419_10102_GENERIC.zip
Archive: p2617419_10102_GENERIC.zip
creating: OPatch/
creating: OPatch/docs/
inflating: OPatch/docs/FAQ
inflating: OPatch/docs/Users_Guide.txt
inflating: OPatch/docs/bt1.txt
inflating: OPatch/docs/bt2.txt
creating: OPatch/jlib/
inflating: OPatch/jlib/opatch.jar
creating: OPatch/perl_modules/
inflating: OPatch/perl_modules/Apply.pm
inflating: OPatch/perl_modules/AttachHome.pm
inflating: OPatch/perl_modules/Command.pm
inflating: OPatch/perl_modules/LsInventory.pm
inflating: OPatch/perl_modules/Query.pm
inflating: OPatch/perl_modules/RollBack.pm
inflating: OPatch/perl_modules/Version.pm
inflating: OPatch/perl_modules/XML.pm
inflating: OPatch/perl_modules/opatchIO.pm
inflating: OPatch/opatch
inflating: OPatch/opatch.pl
inflating: OPatch/opatch.bat
inflating: OPatch/emdpatch.pl
inflating: OPatch/README.txt
将这个路径加到oracle的path中:
:/home/oracle/OPatch
执行opatch lsinventory检查工具
[转]e.g.
将oracle patch上传到oracle目录下面:p4193286_10103_LINUX.zip
解压在oracle目录下面:
[oracle@**** oracle]$ unzip p4193286_10103_LINUX.zip
Archive: p4193286_10103_LINUX.zip
inflating: 4193286/amdcpu.sql
inflating: 4193286/catcpu.sql
inflating: 4193286/catcpu_rollback.sql
creating: 4193286/etc/
creating: 4193286/etc/config/
inflating: 4193286/etc/config/actions
inflating: 4193286/etc/config/inventory
creating: 4193286/etc/xml/
inflating: 4193286/etc/xml/GenericActions.xml
inflating: 4193286/etc/xml/ShiphomeDirectoryStructure.xml
inflating: 4193286/exfcpu.sql
creating: 4193286/files/
creating: 4193286/files/dm/
creating: 4193286/files/dm/admin/
.......
shutdown 数据 库、stop监听
打patch:
[oracle@**** oracle]$ cd 4193286
[oracle@**** 4193286]$ opatch apply
PERL5LIB=/home/oracle/product/10.1.0/db_1/perl/lib/5.6.1:/home/oracle/OPatch/perl_modules; export PERL5LIB
/home/oracle/product/10.1.0/db_1/perl/bin/perl /home/oracle/OPatch/opatch.pl apply
Oracle Home = /home/oracle/product/10.1.0/db_1
Location of Oracle Inventory = /home/oracle/product/10.1.0/db_1/inventory
Oracle Universal Installer shared library = /home/oracle/product/10.1.0/db_1/oui/lib/linux/liboraInstaller.so
Path to Java = /home/oracle/product/10.1.0/db_1/jre/1.4.2/bin/java
Location of Oracle Inventory Pointer = /etc/oraInst.loc
Location of Oracle Universal Installer components = /home/oracle/product/10.1.0/db_1/oui
Required Jar File under Oracle Universal Installer = jlib/OraInstaller.jar
OPatch Version 1.0.0.0.50
Perl Version 5.006001
Copyright (c) 2001-2004 Oracle Corporation. All Rights Reserved.
Command= fuser
Path= /usr/kerberos/bin:/bin:/usr/bin:/usr/local/bin:
[oracle@bj34 4193286]$ opatch apply
Copyright (c) 2005 Oracle Corporation. All Rights Reserved..
OPatch/docs for usage reference. We also recommend using
the latest OPatch version. For the latest OPatch version
and other support related issues, please refer to document
293369.1 which is viewable from metalink.oracle.com
Location of Oracle Universal Installer components = /home/oracle/product/10.1.0/db_1/oui
Location of OraInstaller.jar = "/home/oracle/product/10.1.0/db_1/oui/jlib"
Oracle Universal Installer shared library = /home/oracle/product/10.1.0/db_1/oui/lib/linux/liboraInstaller.so
Location of Oracle Inventory Pointer = /etc/oraInst.loc
Location of Oracle Inventory = /home/oracle/product/10.1.0/db_1/inventory
Path to Java = /home/oracle/product/10.1.0/db_1/jre/1.4.2/bin/java
Log file = /home/oracle/product/10.1.0/db_1/.patch_storage/<patch ID>/*.log
Please shut down Oracle instances running out of this ORACLE_HOME
(Oracle Home = /home/oracle/product/10.1.0/db_1)
Is this system ready for updating?
Please respond Y|N >
y
Patching...
IXDBA.NET技术社区
Backing up comps.xml ...
OPatch succeeded.
[oracle@bj34 4193286]$ opatch lsinventory
Copyright (c) 2005 Oracle Corporation. All Rights Reserved..
OPatch/docs for usage reference. We also recommend using
the latest OPatch version. For the latest OPatch version
and other support related issues, please refer to document
Location of Oracle Universal Installer components = /home/oracle/product/10.1.0/db_1/oui
Location of OraInstaller.jar = "/home/oracle/product/10.1.0/db_1/oui/jlib"
Oracle Universal Installer shared library = /home/oracle/product/10.1.0/db_1/oui/lib/linux/liboraInstaller.so
Location of Oracle Inventory Pointer = /etc/oraInst.loc
Location of Oracle Inventory = /home/oracle/product/10.1.0/db_1/inventory
Path to Java = /home/oracle/product/10.1.0/db_1/jre/1.4.2/bin/java
Log file = /home/oracle/product/10.1.0/db_1/.patch_storage/<patch ID>/*.log
Installed Patch List:
=====================
1) Patch 4193286 applied on Mon Apr 25 11:42:00 CST 2005
[ Base Bug(s): 4003062 4125530 3906246 3965635 3528288 3756949 4048145 4006984 3925449 3909356 3878841 4199450 3878754 4167241 3889519 3878756 3483420 3878793 4193286 3897017 4105639 3925450 4125581 4125549 3878810 4167230 3878817 3458489 4167233 3878835 4118781 3878749 3878839 3878766 4008180 4167237 4057733 3878783 4008181 4008182 4167239 4125511 3111225 ]
SQL> spool logfile
SQL> @catcpu.sql
452:ORA-00955: name is already used by an existing object
461:ORA-00955: name is already used by an existing object
533:ORA-00955: name is already used by an existing object
545:ORA-00955: name is already used by an existing object
563:ORA-00955: name is already used by an existing object
609:ORA-00955: name is already used by an existing object
618:ORA-00955: name is already used by an existing object
659:ORA-00955: name is already used by an existing object
668:ORA-00955: name is already used by an existing object
678:ORA-04043: object MDPRVT_IDX does not exist
853:ORA-00955: name is already used by an existing object
9. The following ignorable errors may be encountered during execution of catcup.sql and catcpu_rollback.sql
ORA-04043: object <object-name> does not exist
ORA-01917: user or role 'XDB' does not exist
ORA-01435: user does not exist
ORA-00955: name is already used by an existing object
ORA-04043: Object Missing.
ORA-01430: column being added already exists in table
如果准备充分的话,当掉数据库到重新启动大约也就20分钟,还是比较顺利的。
今天察看安装文档,发现要求的opatch版本比我使用的要新,还是特别标注的,不知道有什么不同,重新下载了新的opatch,卸掉原来的patch,重新打patch,并没有什么特别的地方。
IXDBA.NET技术社区
但是在运行了一段时间以后,发现我的admin/*/bdump下面有个文件centdb_mmon_9603.trc一直在写,基本上每分钟都写:
内容大致如下:
*** 2005-04-25 15:00:56.580
Unable to schedule a MMON slave at: Auto Flush Main 1
Can happen for several reasons:
- No process state objects
- Reached OS set limits
- A shutdown was going on
Check alert log for more details.