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?


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.

  • +1 That sounds very promising. Going to check it, when I'm back at work.
    – bernd_k
    Jun 6 '11 at 18:03

On windows Oracle Locator Express is a simple (and free) tool to handle setting the oracle home and/or the TNS_ADMIN environment variable.

  • 1
    I would really prefer, to install all the components into one Oracle folder, than to have to switch homes.
    – bernd_k
    Jun 7 '11 at 13:04
  • @bernd_k I understand, this was just something that might help in some small way. Jun 7 '11 at 15:26
  • @Leight Riffel. It's OK. In some cases one wants to evaluate different client releases and than is the hour for such tools.
    – bernd_k
    Jun 7 '11 at 15:35

I have felt your pain, as I probably have 3 or 4 Oracle Homes on my PC, so I have created a tool that will sync and update tnsnames across all of the oracle homes.

You can essentially place your "master" tnsnames into a folder of your choosing where you'll keep it up-to-date, and then schedule the tool to run through the windows task scheduler as frequently as you want, or run it manually on demand.

The documentation is in the readme here: https://github.com/artybug/TNSNamesSync/blob/master/README.md

The executable is here: https://github.com/artybug/TNSNamesSync/releases

  • 2
    It would probably be more helpful if you give a brief description of how to use your tool to solve the OP's problem.
    – Erik
    Mar 26 '16 at 2:51
  • ... and a README on the repo!
    – dezso
    Mar 26 '16 at 9:22
  • The readme on the repo explains how it can be used.
    – artybug
    Mar 26 '16 at 12:45
  • Erik, thanks for the suggestion. I have edited my post to be more specific.
    – artybug
    Mar 26 '16 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.