How do I extract "vsnnum" from oracle binaries or libraries (was Version of Oracle Database without connecting to the database.)

From: Fowler, Kenneth R <>
Date: Mon, 10 Nov 2008 13:58:45 -0500
Message-ID: <>


This thread was of great interest to me as I am currently working on a project to gather server and database metadata for servers and databases in our farm. One part of the project requires the ability to automatically gather data on oracle installations so I was trying to figure out how to get hold of the "vsnnum" value from oracle binaries or libraries.

I can find evidence of "vsnnum" using elfdump (Solaris 10)...

amrndhs014-ora9i $ uname -a
SunOS amrndhs014 5.10 Generic_118833-36 sun4u sparc SUNW,Sun-Fire-V490 amrndhs014-ora9i $ pwd
amrndhs014-ora9i $ /usr/ccs/bin/elfdump bin/oracle | grep vsnnum

   [44804] 0x000102f87748 0x000000000004 OBJT GLOB D 0 .rodata vsnnum
  [136007] 0x000102f87748 0x000000000004 OBJT GLOB D 0 .rodata vsnnum

            [44804] vsnnum
amrndhs014-ora9i $ /usr/ccs/bin/elfdump lib/libcommon9.a | grep vsnnum

     [674]  0x00155e84  (vsndef.o):vsnnum
      [18]  0x000000000000 0x000000000004  OBJT GLOB  D    0 .rodata

But I am having no luck extracting the correct (expected) value. Anyone have any experience with this sort of thing?


Database Services - Infrastructure, Platform and Systems Engineering Worldwide Technology Engineering
Phone (Work): (860) 686-1749
Phone (Cell): (860) 389-3534

-----Original Message-----

[] On Behalf Of Dennis Yurichev Sent: Tuesday, November 04, 2008 12:16 PM To:
Subject: Re: Version of Oracle Database without connecting to the database.


Hash: SHA1

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
> but this is not a very foolproof implementation since installs can take various forms and break this implementation.

oracommon(9|10|11).dll contain exported variable "_vsnnum", which is 32-bit DWORD and reflect precise Oracle 4d or 5d version. This information is used in V$VERSION view.

iEYEARECAAYFAkkQg10ACgkQ1YPmFmJG++M1OwCgxKzhoNdGwoDBhoTvz2BaqRcj tC0AoM+QXRktl8U9KT6lsECuPclRccr7


Received on Mon Nov 10 2008 - 12:58:45 CST

Original text of this message