Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Retrieve Oracle Version

Re: Retrieve Oracle Version

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: 10 Jun 2005 06:12:46 -0700
Message-ID: <1118409166.586472.141320@g47g2000cwa.googlegroups.com>

Tom wrote:
> Hello.
>
> I am a Unix administrator, learning Oracle. I'd like to have a Perl
> script run and collect the Oracle version from numerous servers, all
> running HP-UX.
>
> I know that I can log in via sqlplus as the system user and run "SELECT
> * FROM V$VERSION" however, I was wondering if there was a way to get
> the Oracle version without accessing the system views. Ideally, I'd
> like to do this without connecting to the DB at all.
>
> I appreciate any help.
> Tom

You can extract sqlplus version from the banner if you don't want to connect to the database... however, sqlplus may show a different version then the RDBMS in the banner for pre 8i releases. Not sure about Perl but here is a shell example.

$ echo exit|sqlplus /nolog|grep ": Release"|IFS=" " read v1 v2 v3 v4 $ echo $v3

Regards
/Rauf Received on Fri Jun 10 2005 - 08:12:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US