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: Checking if Oracle 9i is installed

Re: Checking if Oracle 9i is installed

From: Rauf Sarwar <rsarwar_at_ifsna.com>
Date: 24 Jun 2002 08:09:53 -0700
Message-ID: <c2d690f2.0206240709.3f4a88ba@posting.google.com>


"Ramya Priya" <priya.ramya_at_blr.spcnl.co.in> wrote in message news:<af67vo$4hl$1_at_news.mch.sbs.de>...
> My application's installation program has to check if oracle 9.2 is intalled
> on the server, before creating a database for our application.
> For this reason, we need to check som file / registry key to see if oracle
> is installed. looks like that there is no straight forward way of doing it,
> insteag we have to check some installactions.log file or something like
> this.
> Is there any better way?
>
>
>
> "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> wrote in message
> news:u7n6hucbh776a7g87oktfoted9vepq7099_at_4ax.com...
> > On Fri, 21 Jun 2002 19:26:09 +0530, "Ramya Priya"
> > <priya.ramya_at_blr.spcnl.co.in> wrote:
> >
> > >How to programatically detect if Oracle 9.2 is installed in the system
> even
> > >before any Database is created?
> > >Is there any registry key or file avilable which contains the version
> info?
> > >
> > >
> > No, there isn't
> > You sound like you plan to create database(s) on the fly.
> > You are aware a schema in Oracle equates a database in sqlserver?
> >
> > Regards
> >
> >
> > Sybrand Bakker, Senior Oracle DBA
> >
> > To reply remove -verwijderdit from my e-mail address

Unfortunately on WinNT/2K, there is no easy way to find out your Oracle's patchset from outside of Oracle...but there is a way.

For all Oracle versions:
1) To find out if Oracle is installed at all. Check for existense of key HKLM\SOFTWARE\ORACLE

2) To check if multiple Oracle homes are installed. Enumerate HKLM\SOFTWARE\ORACLE\HOMEx keys. HOME0 is first home and so on.

3) To check Oracle home, query value at
HKLM\SOFTWARE\ORACLE\HOMEx\[ORACLE_HOME]

4) To find out base Oracle version
Just check the version of ORACLE_HOME\bin\Oracle*.exe file. You can also do it programatically using version.dll (Windows API). You can also find out base version under inventory folder. Look at explanation below.

For Oracle versions 8.1.x and I believe 9.x also: (Not sure if 8.0.x keeps log of installation. I am sure 7.3.x does not)

To find out your patchset is little tricky. Every time you install Oracle or a patch, a log of it is kept under \Program files\Oracle\Inventory folder by default if you did not change it at time of install. Folder name under \Program files\Oracle\Inventory\Patches\oracle.rdbms gives you the latest patch that was installed. e.g. on my machine, folder name C:\Program files\Oracle\Inventory\Patches\oracle.rdbms\8.1.7.3.0 OR C:\Program files\Oracle\Inventory\Patchsets\oracle.server\8.1.7.3.0 means that my 8.1.7 Oracle installation is at patchset 8.1.7.3.0

On the other hand, if you look for folder name under \Program files\Oracle\Inventory\Components\oracle.rdbms will give you the base version. In my case it is C:\Program
files\Oracle\Inventory\Components\oracle.rdbms\8.1.7.0.0.

This is how I have figured it out. Maybe someone else has a more elegant which I would also be interested in.

HTH
//Rauf Sarwar Received on Mon Jun 24 2002 - 10:09:53 CDT

Original text of this message

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