here is what i did to get my solution sqlplus -v | awk -F"." '{ print $1 }' | awk '{ print $NF }' the answer gives me what i was looking for Thanks all. ----- Original Message ---- From: Bradd Piontek <piontekdd@xxxxxxxxx> To: fuadar@xxxxxxxxx Cc: oracle-l@xxxxxxxxxxxxx Sent: Friday, October 24, 2008 10:58:31 AM Subject: Re: Version of Oracle Database without connecting to the database. or you could try "sqlplus -v' # sqlplus -v SQL*Plus: Release 10.2.0.3.0 - Production sqlplus doesnt' always match the exact patchset of the database, but it'll get you the major level. I'd use that in conjuction with the oratab to get the oracle_homes. opatch is nice, but it assumes you know the oracle_home already. Bradd Piontek "Next to doing a good job yourself, the greatest joy is in having someone else do a first-class job under your direction." -- William Feather On Fri, Oct 24, 2008 at 10:45 AM, Fuad Arshad <fuadar@xxxxxxxxx> 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. -- //www.freelists.org/webpage/oracle-l