一套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?>下載到!