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

  • From: "Powell, Mark D" <mark.powell@xxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>
  • Date: Mon, 10 Nov 2008 16:41:11 -0500

There was just a thread on the subject of getting the Oracle version
from the OS a few days ago here on Oracle-L

I like Jared Still's solution read it from the dbms_utilities package
 
grep -iE 'RDBMS version number|RDBMS release number'
$ORACLE_HOME/rdbms/admin/dbmsutil.sql

Another solution was to pull it out via strings
ver 9i and 10g: strings `which oracle` | grep -i version
ver 11        : strings `which oracle` | grep -i release

There might have been other ideas but these are the ones I remember.

-- Mark D Powell --
Phone (313) 592-5148


-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Fowler, Kenneth R
Sent: Monday, November 10, 2008 1:59 PM
To: oracle-l@xxxxxxxxxxxxx
Cc: dennis@xxxxxxxxxx; fuadar@xxxxxxxxx; Fowler, Kenneth R
Subject: How do I extract "vsnnum" from oracle binaries or libraries
(was Version of Oracle Database without connecting to the database.)

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


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


Other related posts: