How to Handle Multiple Oracle Homes

oracle

On my desktop I have an Oracle client and and Oracle ODAC installed in different homes. I need ODAC because there ADO components off the Client installation don't work correct with CLOB data.

I think I can't go without the client installation, because I need some odbc components.

Now I have to maintain to copies of the tnsnames.ora file. The nest thing I know to do is carefully keep the both tnsnames.ora in sync.

Are there better solutions for a scenario like this?

Best Answer

Assuming that you don't want multiple tnsnames.ora files, the simplest option would be to set the TNS_ADMIN environment variable to point at the one tnsnames.ora file you wanted to maintain on the machine. All the Oracle Homes on the machine would then use the tnsnames.ora file in the directory specified by the TNS_ADMIN setting before looking for an entry in the local Oracle Home's tnsnames.ora file.