• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1566
  • Last Modified:

ORACLE_HOME problems

Hello there,
Been having a series of Oracle Home problems as those helpfully answering my questions would know!
Here's the immediate problem (I'll provide more details on what led to this whole circus if you think it would be useful)

I've got Oracle 10g, 11g clients installed. Previously I also had a 9.2 client on which I had removed.
Due to a some problems I had to install an Oracle 9 OLE DB patch (which also installs the 9 client) - package as avaialble in the ready installs in the bank.

The first thing that I noticed in the Universal installer was that under installed products now it only showed Oracle Home 9 - it couldn't find 10 and 11 (which previously were visible)

Now, my VBA application was still not able to connect to the database (through OraOLEDB provider). I changed the ORACLE_HOME env variable to point to 9 instead of 11 but still no luck connecting.
Removed the OLEDB patch 9 (which also uninstalls the 9 client). Now the OUI cannot find any oracle products installed although 10 and 11 are very much installed!!

Any ideas why this is happening and how to set it right please?

Thanks!
0
lm78
Asked:
lm78
  • 5
  • 3
  • 3
  • +2
3 Solutions
 
OP_ZaharinCommented:
Set the ORACLE_HOME in the environment variable of the System Section in properties of My Computer:

set ORACLE_HOME=path of your Oracle client is installed
0
 
lm78Author Commented:
That's already been set at the machine level from My computer!
0
 
lm78Author Commented:
The Environment tab in the Oracle Univ installer says

"C:\program files\oracle\inventory\"
There are no Oracle Homes to select.

Why is it looking there and not at the ORACLE_HOME that I've set which points to
C:\program files\oracle\product\11.1.0\client_1!
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
OP_ZaharinCommented:
- why not remove all existing client and do a fresh install using Oracle 11g instant client? i believe its backward compatible means your old application able to connect using the latest client. make a backup of your tnsnames should you need it.
0
 
OP_ZaharinCommented:
- try set the home from command prompt: Set ORACLE_HOME = the path

- if you choose to fresh install the Oracle instant client, download it here: http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html
0
 
slightwv (䄆 Netminder) Commented:
>>"C:\program files\oracle\inventory\"


Oracle keeps a shared inventory file in that folder.  That is how the OUI knows everything that is installed.  The OUI doesn't really go by the setting of ORACLE_HOME.

It's possible the removal of the 9i client trashed or removed the entire inventory file.

I tend to agree with the post above of starting over.
0
 
coldchillinCommented:
I would check the registry
0
 
slightwv (䄆 Netminder) Commented:
>>I would check the registry

That really isn't much help.  If you are going to post that at least tell the asker what they might be looking for and how it might answer their question.
0
 
coldchillinCommented:
Sorry, slightwv.

Search ORACLE_HOME, see if it is set to something you don't want it set to, export and delete.

---
The Environment tab in the Oracle Univ installer says

"C:\program files\oracle\inventory\"
There are no Oracle Homes to select.

Why is it looking there and not at the ORACLE_HOME that I've set which points to
C:\program files\oracle\product\11.1.0\client_1!
---


0
 
mrjoltcolaCommented:
Couple of things.

1) In windows, Oracle looks to the registry for the default Oracle home, regardless of what you set in the environment variable.

2) The registry contains a default home under
  HKEY_LOCAL_MACHINE
    Software
      Oracle -> DEFAULT_HOME

3) You should have the PATH variable setup such that the default home's BIN directory is first

4) You can use the home selector to switch between homes, it will modify the PATH variable and the registry appropriately. In 10g and later the home selector is part of the OUI (Installed Products -> Environment)

5) If the OUI doesn't show previous installed Oracle products, could be that the Oracle base was different and you have 2 inventory locations. It could also be that it got overwritten. The default Oracle inventory location is under \Program Files\ (though with Windows 64, there are is Program Files and Program Files (x86) so 32-bit and 64-bit installs may result in 2 different inventories (I am not sure, this is just a guess). But if you had overridden ORACLE_BASE env var, then OUI would have used that instead.

Hope this helps you figure out where the missing homes are.




0
 
mrjoltcolaCommented:
@coldchillin: "Why is it looking there and not at the ORACLE_HOME that I've set which points to ..."

Because ORACLE_HOME does not affect where the Oracle Inventory is. ORACLE_BASE does, however.
0
 
coldchillinCommented:
Thanks for the assist mrjoltcola,

I had a problem with TOAD using an old ORACLE_HOME, and the tsora file (or whatever it's called).

I remember googling:

ORACLE_HOME registry

and the answers and explanations were at my fingertips
0
 
lm78Author Commented:
Thanks for your responses -

@mrjltcola: I'm not too sure it actually checks the registry for the ORACLE_HOME path because sometime back, calling some C# dll's from my VBA project (which in turn connected using ODP.net) caused the VBA proj (which connected using OraOLEDB) to fail. Setting the ORACLE_HOME at machine level and restarting Excel made it work again.

The default home in the registry is 9 (for some reason - think that's the first Client I installed). The default variables in the registry seem almost unaffected between de-install and install of 9 client. But it would work if the Path variable and the HOME setting matched. (have had HOME in path set to both 10 and 11 and it works) Currently that fails as well and I've run out of tricks!

I'll try maybe uninstalling all clients as suggested and re installing them.  But uninstalling many times doesn't seem to remove the existing registry entries and set it right.

If it's of interest, the most recent problem arose because we had to test our VBA application using an Addin - and just discovered that the Addin registered some Oracle Dll's (oci and occi ) in it's own path - and after that our application broke! Trying to find a way to work around it.

Attached some screen shots of my registry entries if it's of any use.


oracle-1.jpg
oracle-all-homes.jpg
Oracle-home0.jpg
oracle-ID0.jpg
0
 
mrjoltcolaCommented:
lm78: You are correct, setting ORACLE_HOME on Windows does seem to override the registry, so I stand corrected.

The rest of my post still stands. According to the docs, Oracle/OUI will not use ORACLE_HOME to locate the inventory, and ORACLE_HOME is not required unless you are trying to override the defaults.

Also make sure that changes to ORACLE_HOME are coupled with changes to PATH - this is why the home selector can be used.
0
 
lm78Author Commented:
Copied an older backed up inventory.xml file to the ContentsXML folder, tweaked the homes in it and it worked again. Find this a bit exasperating!
Thanks for all the help!
0
 
lm78Author Commented:
Solutions helped point in the right direction, did not fully solve it. Thanks.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 5
  • 3
  • 3
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now