ORACLE查看数据库安装补丁情况
2012-06-30 15:32 潇湘隐者 阅读(22278) 评论(1) 编辑 收藏 举报查看ORACLE数据库的版本以及补丁情况,可以通过opatch lsinventory命令来查看,Linux版本和Windows版本几乎差不多(测试的两台机器都没有打补丁。呵呵!):
先看一下Windows平台的设置:
首先转到ORACLE_HOME目录,然后切换到OPatch目录:(如下所示)
E:\>cd E:\app\kerry\product\11.2.0\dbhome_1
E:\app\kerry\product\11.2.0\dbhome_1>cd OPatch
如果首先没有设置ORACLE_HOME目录,则会报如下错误:
E:\app\kerry\product\11.2.0\dbhome_1\OPatch>opatch lsinventory
Oracle Home is not set. OPatch cannot proceed!
OPatch succeeded.
Linux平台查看版本补丁
首先查看一下ORACLE_HOME目录,如下所示:
[oracle@DB-Server ~]$ echo $ORACLE_HOME
/database/product/dbhome_1
[oracle@DB-Server ~]$
[oracle@DB-Server OPatch]$ ./opatch lsinventory
Invoking OPatch 10.2.0.1.0
Oracle interim Patch Installer version 10.2.0.1.0
Copyright (c) 2005, Oracle Corporation. All rights reserved..
Oracle Home : /database/product/dbhome_1
Central Inventory : /database/oraInventory
from : /database/product/dbhome_1/oraInst.loc
OPatch version : 10.2.0.1.0
OUI version : 10.2.0.1.0
OUI location : /database/product/dbhome_1/oui
Log file location : /database/product/dbhome_1/cfgtoollogs/opatch/opatch-2012_Jun_02_10-00-07-CST_Sat.log
Lsinventory Output file location : /database/product/dbhome_1/cfgtoollogs/opatch/lsinv/lsinventory-2012_Jun_02_10-00-07-CST_Sat.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 10g 10.2.0.1.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------
OPatch succeeded.