查看Oracle已打过的补丁使用Oracle自带的工具OPatch,在Oracle目录:$ORACLE_HOME/OPatch/,执行opatch即可。以下是操作:
[root@d156 ~]# su - oracle
[oracle@d156 ~]$ env | grep ORA
ORACLE_UNQNAME=aidev
ORACLE_SID=aidev1
ORACLE_BASE=/oracle/base
ORACLE_HOSTNAME=d156
ORACLE_TERM=xterm
ORACLE_HOME=/oracle/base/db
[oracle@d156 ~]$ cd /oracle/base/db
[oracle@d156 db]$ cd OPatch/
[oracle@d156 OPatch]$ pwd
/oracle/base/db/OPatch
[oracle@d156 OPatch]$ ls
crs docs emdpatch.pl fmw jlib ocm opatch opatch.ini opatch.pl opatchprereqs
[oracle@d156 OPatch]$ ./opatch lsinventory -all
Invoking OPatch 11.2.0.1.1
Oracle Interim Patch Installer version 11.2.0.1.1
Copyright (c) 2009, Oracle Corporation. All rights reserved.
Central Inventory : /oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.1
OUI version : 11.2.0.2.0
OUI location : /oracle/base/db/oui
Log file location : /oracle/base/db/cfgtoollogs/opatch/opatch2012-06-11_11-29-15AM.log
Patch history file: /oracle/base/db/cfgtoollogs/opatch/opatch_history.txt
Lsinventory Output file location : /oracle/base/db/cfgtoollogs/opatch/lsinv/lsinventory2012-06-11_11-29-15AM.txt
--------------------------------------------------------------------------------
List of Oracle Homes:
Name Location
Oracrs102 /oracle/grid
OraDb11g_home1 /oracle/base/db
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.2.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
OPatch failed with error code 130
[oracle@d156 OPatch]$ ./opatch lsinventory -detial