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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Find out oracle version

Re: Find out oracle version

From: Kevin Reardon <kreardon_at_cerere.na.astro.it>
Date: 1997/08/08
Message-ID: <33EB6322.4E7F@cerere.na.astro.it>#1/1

Andy Harrison wrote:
> Anyone know a way to find the version of rdbms from the command line, > as I have about 3000 machines on which I need to audit

Andy,

I found a way to do this in Unix from an old issue of Oracle News (Summer, 1994) that was included on a recent (1.2.7.0.0) Support Notes CD-ROM. The installed writes a file called unix.rgs (in the newsletter they called it un-ix.prd, but no such file exists in my 7.3.2 installation) in the $ORACLE_HOME/orainst directory. This file contains the version numbers for all products available from the installer. Each installed subset writes a separate file called in its respsctive subdirectory called $ORACLE_HOME/*/install/partial.prd.

A simple awk script, called version.awk was provided to convert these files into a human-readable form:
{
printf("%s", $5)
for (i=6; i<NF; i++) {
  if (index (substr($i,length ($i), 1), "\"") ==0)

         printf("%s", $i);
  else {

         printf ("%s\n", $i);
         break;
         }

  }
}

Then from the command line, to know all available versions, type:
%> awk -f version.awk $ORACLE_HOME/orainst/unix.rgs | tr '"' '\11'

Or to only list installed subset versions:
%> awk -f version.awk $ORACLE_HOME/*/install/partial.prd | tr '"' '\11'

To be sure you get all subsets, you may need to go down a second directory level:
%> awk -f version.awk $ORACLE_HOME/*/*/install/partial.prd

This can be automated of course by using dbhome to provide the value for $ORACLE_HOME. I hope this helps.

kevin reardon
Osservatorio Astronomico di Capodimonte Received on Fri Aug 08 1997 - 00:00:00 CDT

Original text of this message

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