?
Solved

ORACLE_HOME problems

Posted on 2011-05-12
16
Medium Priority
?
1,479 Views
Last Modified: 2012-05-11
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
Comment
Question by:lm78
  • 5
  • 3
  • 3
  • +2
16 Comments
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 35747939
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
 

Author Comment

by:lm78
ID: 35747954
That's already been set at the machine level from My computer!
0
 

Author Comment

by:lm78
ID: 35747971
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
Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 35747994
- 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
 
LVL 23

Expert Comment

by:OP_Zaharin
ID: 35748049
- 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
 
LVL 78

Accepted Solution

by:
slightwv (䄆 Netminder) earned 900 total points
ID: 35748052
>>"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
 
LVL 1

Expert Comment

by:coldchillin
ID: 35748053
I would check the registry
0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 35748082
>>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
 
LVL 1

Expert Comment

by:coldchillin
ID: 35748160
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
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 600 total points
ID: 35748962
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
 
LVL 40

Expert Comment

by:mrjoltcola
ID: 35748983
@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
 
LVL 1

Expert Comment

by:coldchillin
ID: 35749112
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
 

Author Comment

by:lm78
ID: 35753172
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
 
LVL 40

Assisted Solution

by:mrjoltcola
mrjoltcola earned 600 total points
ID: 35756697
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
 

Author Comment

by:lm78
ID: 35779295
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
 

Author Closing Comment

by:lm78
ID: 35779319
Solutions helped point in the right direction, did not fully solve it. Thanks.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows how to recover a database from a user managed backup
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Suggested Courses
Course of the Month13 days, 9 hours left to enroll

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question