Re: Version of Oracle Database without connecting to the database.
Date: Fri, 24 Oct 2008 19:55:15 +0100
Message-ID: <49021A13.1050307@petefinnigan.com>
Hi Fuad,
I see that you have a solution but there are some other options that you could consider:
- do a strings on $ORACLE_HOME/bin/sqlplus | grep -v FileVersion - next to it in the binary is 11.1.0.6 in 11g for instance
- 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
- A bit more exotic - use a shared memory attach program - there are examples on my site - http://www.petefinnigan.com/other.htm
- 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.
- probe the $ORACLE_HOME/dbs/spfile???.ora or init.ora and check the compatability setting
... I am sure there are more variations
cheers
Pete
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.
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
-- Pete Finnigan Principal Consultant PeteFinnigan.com 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 email: pete_at_petefinnigan.com site : http://www.petefinnigan.com 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 PeteFinnigan.com Limited. This email is not intended nor should it be taken to create any legal relations, contractual or otherwise. -- http://www.freelists.org/webpage/oracle-lReceived on Fri Oct 24 2008 - 13:55:15 CDT