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

  • From: "Fowler, Kenneth R" <Kenneth.R.Fowler@xxxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 10 Nov 2008 13:58:45 -0500

Hi,


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
/app/oracle/product/9.2.0.8_64
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
vsnnum


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


Thanks,
Ken.
 

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

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Dennis Yurichev
Sent: Tuesday, November 04, 2008 12:16 PM
To: fuadar@xxxxxxxxx
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: Version of Oracle Database without connecting to the
database.

-----BEGIN PGP SIGNED MESSAGE-----
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
/usr/local/oracle/product/10.2
> 
> 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.


- --
My PGP public key: http://yurichev.com/dennis.yurichev.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkkQg10ACgkQ1YPmFmJG++M1OwCgxKzhoNdGwoDBhoTvz2BaqRcj
tC0AoM+QXRktl8U9KT6lsECuPclRccr7
=WkmL
-----END PGP SIGNATURE-----
--
//www.freelists.org/webpage/oracle-l


--
//www.freelists.org/webpage/oracle-l


Other related posts: