RE: How do I extract "vsnnum" from oracle binaries or libraries (was Version of Oracle Database without connecting to the database.)
Date: Mon, 10 Nov 2008 16:41:11 -0500
Message-ID: <D1DC33E67722D54A93F05F702C99E2A90318FC43@usahm208.amer.corp.eds.com>
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_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Fowler, Kenneth R
Sent: Monday, November 10, 2008 1:59 PM
To: oracle-l_at_freelists.org
Cc: dennis_at_conus.info; fuadar_at_yahoo.com; 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 .rodatavsnnum
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_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Dennis Yurichev
Sent: Tuesday, November 04, 2008 12:16 PM
To: fuadar_at_yahoo.com
Cc: oracle-l_at_freelists.org
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-----
-- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-lReceived on Mon Nov 10 2008 - 15:41:11 CST