FW: Version of Oracle Database without connecting to the database.

From: Powell, Mark D <mark.powell_at_eds.com>
Date: Wed, 5 Nov 2008 11:40:19 -0500
Message-ID: <D1DC33E67722D54A93F05F702C99E2A90315AE23@usahm208.amer.corp.eds.com>


Mark, your command failed on my AIX 5.3 running 9.2 on the term Release and also on a 10.2 system we have on another server (Also AIX 5.3L). I tried version instead and got some information back:  

$ strings `which oracle` | grep -i version
ˤNLSRTL Version - Production  

$ strings `which oracle` | grep -i version
NLSRTL Version - Production  

It looks like the version and maybe platform is an issue for what you can try on the OS command line.  

  • Mark D Powell -- Phone (313) 592-5148
	From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Mark W. Farnham
	Sent: Tuesday, November 04, 2008 5:53 PM
	To: jkstill_at_gmail.com; fuadar_at_yahoo.com
	Cc: oracle-l_at_freelists.org
	Subject: RE: Version of Oracle Database without connecting to the database.

	Are we allowed to connect to the server and know which oracle binary file is running or set $PATH the way it would be after . oraenv is run?


	Then, for example, 


	strings `which oracle` | grep Release | grep 'Oracle Database' | grep -v %


	will report a string like: Oracle Database 11g Release - Production

	I think this works pretty far back, but I haven't tested it except on 11g today.


	Of course this probably requires more horsepower than connecting and selecting from v$instance, but maybe you're not concerned about the horsepower.

	Just be sure you don't look at any of those strings you might see without a tight grep filter or you might be "reverse engineering the product."


	I would never look at the strings in the Oracle binary, of course, and I just guessed that 'Oracle Database' and Release would scope it down for you. (And I figured you didn't want the one with the format string, just the literal text one....)







	From: oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Jared Still
	Sent: Tuesday, November 04, 2008 4:53 PM
	To: fuadar_at_yahoo.com
	Cc: oracle-l_at_freelists.org
	Subject: Re: Version of Oracle Database without connecting to the database.


	Here's yet another way:
	grep -iE 'RDBMS version number|RDBMS release number' $ORACLE_HOME/rdbms/admin/dbmsutil.sql
	  version constant pls_integer := 9; -- RDBMS version number
	  release constant pls_integer := 2; -- RDBMS release number
	Jared Still
	Certifiable Oracle DBA and Part Time Perl Evangelist

	On Fri, Oct 24, 2008 at 7:45 AM, Fuad Arshad <fuadar_at_yahoo.com> wrote:

	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.


Received on Wed Nov 05 2008 - 10:40:19 CST

Original text of this message