John
John

Reputation: 69

Specifying where to place Oracle tnsnames.ora and getting ODBC to connect to Oracle database

I am trying to configure my ODBC for Oracle. I installed Oracle client. I went to the ODBC Data Source Administrator and clicked Add and selected Oracle in OraClient 11g_home. I filled out the DataSource Name, TNS Service Name and UserID. I clicked Test Connection and it gave me the ORA-12154 error.

I realized that I did not specified the TNS_ADMIN path in the registry. Looking at the TNS file, the ODBC connection will look for the tnsnames.ora file for additional information, correct?

So, I googled and found that it states to specified the TNS_ADMIN path to c:\oracle_install_folder\product\11.2.0\client_1\network\admin

I just installed oracle client but not the Administrator install. I checked and did not find the network\admin folder under client_1.

Questions:

  1. To get my Oracle ODBC to connect, I need to add TNS_ADMIN to my registry?
  2. What path to TNS_ADMIN?
  3. I don't see network\admin folder, do I need to reinstall with Oracle Client and select the Administrator package?
  4. Where do I copy the tnsnames.ora file to?

Thanks...

Upvotes: 1

Views: 4679

Answers (1)

Edwig Huisman
Edwig Huisman

Reputation: 21

You do not need to set the TNS_ADMIN in the registry. The simplest way is to copy your 'tnsnames.ora' file to any place, as long as you set an environment variable TNS_ADMIN that points to the directory that contains the tnsnames.ora file. So the answers are:

  1. No, you do not need to set it to the registry
  2. The path to TNS_ADMIN can be whatever you like
  3. No, you do not need to reinstall the Oracle client
  4. To the directory TNS_ADMIN points to

You can set the TNS_ADMIN variable through "system properties / advanced properties / Environment variables / system variables"

Upvotes: 0

Related Questions