查看oracle版本和补丁

1、查看oracle版本

sqlplus nolog
conn sys/oracle as sysdba
SQL> select * from product_component_version;

PRODUCT
——————————————————————————–
VERSION
——————————————————————————–
STATUS
——————————————————————————–
NLSRTL
11.2.0.3.0
Production

Oracle Database 11g Enterprise Edition
11.2.0.3.0
64bit Production
PRODUCT
——————————————————————————–
VERSION
——————————————————————————–
STATUS
——————————————————————————–

PL/SQL
11.2.0.3.0
Production
TNS for Linux:
11.2.0.3.0

PRODUCT
——————————————————————————–
VERSION
——————————————————————————–
STATUS
——————————————————————————–
Production

2、查看oracle打过的补丁
echo $ORACLE_HOME
/usr/local/oracle/oracle/product/11.2.0/db_1
 cd /usr/local/oracle/oracle/product/11.2.0/db_1
 cd OPatch/
 ./opatch lsinventory
Invoking OPatch 11.2.0.1.7
 
Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation.  All rights reserved.
 
Oracle Home       : /usr/local/oracle/oracle/product/11.2.0/db_1
Central Inventory : /usr/local/oracle/grid/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.7
OUI version       : 11.2.0.3.0
Log file location : /usr/local/oracle/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2014-11-10_21-35-23PM.log
 
Lsinventory Output file location : /usr/local/oracle/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-11-10_21-35-23PM.txt
 
——————————————————————————–
Installed Top-level Products (1): 
 
Oracle Database 11g                                                  11.2.0.3.0
There are 1 products installed in this Oracle Home.
 
There are no Interim patches installed in this Oracle Home.
 
Rac system comprising of multiple nodes
  Local node = elecdb-node1
  Remote node = elecdb-node2
 
——————————————————————————–
 
OPatch succeeded.

发表评论