一套11.1.0.6的RAC系统在在使用opatch工具时出现了OutOfMemoryError: Java heap space错误,其错误日志如下:
opatch lsinventory
Invoking OPatch 11.1.0.6.2

Oracle Interim Patch Installer version 11.1.0.6.2
Copyright (c) 2007, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/oracle/db/11.1.0
Central Inventory : /u01/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.1.0.6.2
OUI version       : 11.1.0.7.0
OUI location      : /u01/oracle/db/11.1.0/oui
Log file location : /u01/oracle/db/11.1.0/cfgtoollogs/opatch/opatch2011-03-11_03-05-22AM.log

Lsinventory Output file location : /u01/oracle/db/11.1.0/cfgtoollogs/opatch/lsinv/lsinventory2011-03-11_03-05-22AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (2):

Oracle Database 11g                                                  11.1.0.6.0
Oracle Database 11g Patch Set 1                                      11.1.0.7.0

Interim patches (3) :

Patch  8496830      : applied on Wed Mar 30 07:11:26 CDT 2011
   Created on 27 Aug 2009, 01:59:52 hrs PST8PDT
   Bugs fixed:
     8496830

Patch  7327166      : applied on Wed Oct 20 11:25:00 CDT 2010
   Created on 31 Dec 2008, 10:49:56 hrs PST8PDT
   Bugs fixed:
     7327166

Patch  7253531      : applied on Wed Jul 28 14:45:44 CDT 2010
   Created on 24 Nov 2008, 03:52:49 hrs PST8PDT
   Bugs fixed:
     7253531
Exception in thread "Thread-7" Exception in thread "Thread-3" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
事后发现是由于opatch期间1号节点无法使用ssh服务登陆到其他节点上引起的,修复该故障后问题消失了。 另外提一句我们建议使用最新版本的opatch工具来管理数据库补丁,最新版本的opatch工具可以从 <OPatch - Where Can I Find the Latest Version of OPatch?>下载到!