Sunday 17 April 2016

How to find Oracle Version?


There is many way to find out.
1. Through SQLPLUS.
C:\app\oracle\test\product\11.1.0\db_1\BIN> sqlplus /nolog

SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jul 31 12:23:54 2008
Copyright (c) 1982, 2007, Oracle. All rights reserved.

2. Through Data dictionary view
SQL> select * from v$version;

BANNER
-------Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
PL/SQL Release 11.1.0.6.0 - ProductionCORE 11.1.0.6.0 Production
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
NLSRTL Version 11.1.0.6.0 – Production

3. We can also find the oracle version by

strings $ORACLE_HOME/bin/oracle | grep NLSRTL

[oracle@oraclelinux udump]$ strings $ORACLE_HOME/bin/oracle | grep NLSRTL
NLSRTL Version 10.2.0.1.0 - Production

4. We can also use the below Views

 SQL> SELECT VERSION FROM v$instance;
or
SQL> select * from product_component_version;

5. opatch lsinventory

1. Set ORACLE_HOME variable
2. go to OPATCH directory
3. run opatch lsinventory
C:\>set oracle_home=c:\app\oracle\test \product\11.1.0\db_1
C:\>cd %ORACLE_HOME%\opatch
C:\app\oracle\test \product\11.1.0\db_1\OPatch>opatch lsinventory
Invoking OPatch 11.1.0.6.0
.
.
Installed Top-level Products (1):
Oracle Database 11g 11.1.0.6.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.

OPatch succeeded.

6. check SQLNET.LOG file
check SQLNET.LOG file in ORACLE_HOME\network\log
you will find below entries
VERSION INFORMATION:
TNS for 32-bit Windows: Version 11.1.0.6.0 - Production
Windows NT TCP/IP NT Protocol Adapter for 32-bit

Windows: Version 11.1.0.6.0 - Production

No comments:

Post a Comment