Re: Version of Oracle Database without connecting to the database.

From: Pete Finnigan <>
Date: Fri, 24 Oct 2008 19:55:15 +0100
Message-ID: <>

Hi Fuad,

I see that you have a solution but there are some other options that you could consider:

  1. do a strings on $ORACLE_HOME/bin/sqlplus | grep -v FileVersion - next to it in the binary is in 11g for instance
  2. Do the same on any dll or shared object and the version is hard coded in them so you can get at it with strings
  3. A bit more exotic - use a shared memory attach program - there are examples on my site -
  4. another option is to probe the listener, there are around 5 ways to do this. Dave Litchfields OAK toolkit has some example code and binaries, some are not affected by a password and if you are local its fine anyway.
  5. probe the $ORACLE_HOME/dbs/spfile???.ora or init.ora and check the compatability setting

... I am sure there are more variations



Fuad Arshad wrote:
> Folks,
> I'm trying to find a way to script finding an approximation of the version of the database without connecting to the database itself.
> The goal is to try to find out of the Oracle_home is a Oracle 10 home , 9 home etc .
> right now i'm doiing something like
> DATAVERSION1=`echo $ORACLE_HOME | awk -F/ '{print $6}'`
> expecting that $6 would lead me to something like /usr/local/oracle/product/10.2
> but this is not a very foolproof implementation since installs can take various forms and break this implementation.
> Any ideas of how i can get the oracle version info considering that i will always know the value of $ORACLE_HOME.
> --


Pete Finnigan
Principal Consultant Limited

Registered in England and Wales
Company No: 4664901

Specialists in database security.

If you need help to audit or secure an Oracle database, please ask for
details of our courses and consulting services

Phone: 0044 (0)1904 791188
Fax  : 0044 (0)1904 791188
Mob  : 0044 (0)7742 114223
site :

Please note that this email communication is intended only for the
addressee and may contain confidential or privileged information. The
contents of this email may be circulated internally within your
organisation only and may not be communicated to third parties without
the prior written permission of Limited.  This email is
not intended nor should it be taken to create any legal relations,
contractual or otherwise.

Received on Fri Oct 24 2008 - 13:55:15 CDT

Original text of this message