Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Retrieve Oracle Version
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