Tnsnames Ora Location Windows

Nov 29, 2016  will print the location of the tnsnames.ora file in that directory. It is not necessary to have the Oracle client installed to use tnsnames.ora with Tableau Server. If no tnsnames.ora file is present on this computer, create one using a text editor. The tnsnames.ora file name is case sensitive, and must be in all lower-case letters. Data source alias in the tnsnames.ora file at the location specified by TNSADMIN in the.NET config file. Data source alias in the tnsnames.ora file present in the same directory as the.exe. Data source alias in the tnsnames.ora file present at%TNSADMIN% (where%TNSADMIN% is.

Active1 year, 1 month ago

I installed both the 32 and 64-bit Oracle 11g drivers. I search my PC looking for files with the name 'tnsnames.ora' and found 3 in the following locations:

The existence of the 3rd location of the tnsnames.ora file surprises me.

Tnsnames.ora location windows instant client

I have the following Oracle clients installed on my PC:

Based on the location of each program (Program Files (x86) vs. c:Program Files), This suggests to me that the Toad, a 32 bit program, should use the 32 bit driver and dbForge should use the 64 bit driver.

Website not responding windows 7. May 09, 2017  When running Windows 7, you may find it not responding due to an unresponsive program like Microsoft Outlook, web browser, antivirus, plug-in etc. Mar 11, 2015  Windows 7 Forums is the largest help and support community, providing friendly help and advice for Microsoft Windows 7 Computers such as Dell, HP, Acer, Asus or a custom build. I've recently been getting 'Web Page Not Responding' errors on virtually every web page visited. May 26, 2016  Website not responding Website not responding windows 7.  Check for suspicious Internet Explorer add-ons. Add- ons, also known as ActiveX controls, browser extensions, browser helper objects, or toolbars, can improve your experience on a website. Sep 16, 2012  Windows 7 Forums is the largest help and support community, providing friendly help and advice for Microsoft Windows 7 Computers such as Dell, HP, Acer, Asus or a custom build. Since using windows 7 on my new computer web pages frequently stop responding especially BBS sportspage as this will not update and Windows 7 is not able to rectify this.

dbForge seems to use either the tnsnames.ora file in either location #2 or #3. I know this by systematically renaming all but one of the tns files and then checking to see if the connection names read from the file are available when trying to create a new connection from with the app.

However, TOAD seems to only recognize the tnsnames.ora file in location #3 and it did not recognize the tnsnames.ora file in location 2 at all! (Being that it was a 32 bit program, I did not expect it to recognize the tns file in location 2 and that was the case). TO summarize the TOAD test for the sake of hopeful clarity, TOAD only recognized the tns file in location 3.

Other colleagues do not have a tns file in location 3 on their machines. I'm not sure why I do. When I run Toad, it shows the following 2 Home, with the 32 bit Home as being the active one.

Q1: Is OraClient11g_home1 my 64 bit home or do I have two Oracle clients installed?

Q2: Why doesn't 32 bit TOAD use the tns in location #1 instead of only using the one in location #3?

Q3: If I leave on the tns file in location 3, both dbForge and TOAD work but I'd like to know why so I can accurately understand how to move tns info from one machine to another.

Wilfred Hughes
18.5k11 gold badges103 silver badges144 bronze badges
ChadDChadD
10.7k43 gold badges158 silver badges279 bronze badges

2 Answers

Just based on your paths you have two installed clients as you suspect (Toad and dbforge are tools, not clients so your terminology is a bit off). One 32-bit, the other 64-bit. It appears that Toad is 32-bit based on its installation path, but execute it and go to Help|Support Bundle. You'll see the top header will be 'APPLICATION INFORMATION (32-bit)' or 'APPLICATION INFORMATION (64-bit)' just to confirm. Toad 11.6 was the first to introduce a 64-bit version.

Toad will only see the Oracle client that is for the same platform as it. So your 64-bit client is irrelevant for Toad's sake. The C:WindowsTNS appears to be a folder used for TNS_ADMIN folder given its odd location and the fact that Toad sees it. At command prompt execute SET TNS_ADMIN and see if it reports 'TNS_ADMIN=C:WindowsTNS' If it does, then all Tools should be using that tnsnames.ora. That's a global override if you will that points to the folder containing your net configuration files. If you don't have TNS_ADMIN set as an environment variable then look for it in your Oracle root registry: HKEY_LOCAL_MACHINESoftwareOracle.

If you use a common set of connections for all of your tools I'd delete all of your tnsnames.ora files. I'd also relocate that C:WindowsTNS folder to somewhere more appropriate like C:OracleAdmin and create your tnsnames.ora, sqlnet.ora, and ldap.ora (if applicable) there. Create a TNS_ADMIN environment variable pointing to that location.

Michael S.Michael S.

According Oracle these locations are searched for tnsnames.ora, resp. sqlnet.ora and ldap.ora:

Tnsnames.ora Location Windows 7

  1. Oracle Net files in present working directory (PWD/CWD)
  2. TNS_ADMIN defined sessionally or by user-defined script
  3. TNS_ADMIN defined as a global environment variable
  4. TNS_ADMIN defined in the registry
  5. Oracle Net files in %ORACLE_HOME/network|net80admin (Oracle default location)

However, I am not sure whether each application/driver follows this list. I got this list from Oracle Document 111942.1 referring to Oracle 9i, so it might be outdated.

In Database Net Services Administrator's Guide the order is

  1. TNS_ADMIN defined by environment variable
  2. TNS_ADMIN defined in the registry (if TNS_ADMIN environment variable is not present)
  3. %ORACLE_HOME%/network/admin directory (if TNS_ADMIN environment variable is not present)

I would recommend to define an environment variable for TNS_ADMIN and use only one tnsnames.ora file. In order to be on the safe side, check also your registry values.

Free download or read online, freedom at Midnight pdf (ePUB) book. The first edition of this novel was published in October 1975, and was written by Larry Collins. The book was published in multiple languages including English language, consists of 629 pages and is available in Paperback format. The main characters of this cultural, india story are,. Freedom at midnight free download. Freedom at midnight Download Book Freedom At Midnight in PDF format. You can Read online, freedom At Midnight here in PDF, EPUB, Mobi or Docx formats. Mihir Bose was born in January 1947. Eight months later, India became a modern, free nation. The country he knew growing up in the 1960s has undergone vast and radical change. Freedom At Midnight. These are the books for those you who looking for to read the Freedom At Midnight, try to read or download Pdf/ePub books and some of authors may have disable the live reading.Check the book if it available for your country and user who already subscribe will have full access all free books from the library source. Download Freedom at Midnight – Larry CollinsDominique Lapierre ebook The electrifying story of India’s struggle for independence, told in this classic account (first published in 1975) by two fine journalists who conducted hundreds of interviews with nearly all the surviving participants – from Mountbatten to the assassins of Mahatma Gandhi. Freedom At Midnight This book list for those who looking for to read and enjoy the Freedom At Midnight, you can read or download Pdf/ePub books and don't forget to give credit to the trailblazing authors.Notes some of books may not available for your country and only available for those who subscribe and depend to the source of the book library websites.

If your files are not located in %ORACLE_HOME%networkadmin, I recommend to create a symbolic link for it - just to be on the very safe side, e.g. mklink /d %ORACLE_HOME%networkadmin c:Oraclecommonsettingsadmin

Another note, you don't have to 'play' with your tnsnames.ora file. With Process Monitor from Microsoft Sysinternals you can monitor each file access, i.e. the filter would be Path contains tnsnames

Update

When I run a test on my machine I get following order:

  1. Environment variable TNS_ADMIN
  2. Registry Key HKEY_CURRENT_USERSOFTWAREORACLEKEY_{Oracle_Home_Name}TNS_ADMIN
  3. Registry Key HKEY_LOCAL_MACHINESOFTWAREORACLEKEY_{Oracle_Home_Name}TNS_ADMIN, resp. HKEY_LOCAL_MACHINESOFTWAREWow6432NodeORACLEKEY_{Oracle_Home_Name}TNS_ADMIN

    -> Only if TNS_ADMIN Environment variable is not set.

  4. %ORACLE_HOME%networkadmin
  5. Current directory (which can be different to directory where your application is located)
  6. Folder where your application is located

Update 2

Obviously there is no fix search, it varies for different providers/drivers. Maybe it also depends on the Oracle version.

Oracle Tns File Location

For example, the Oracle HTTP Server reads TNS_ADMIN setting from opmn.xml config file.

Another example, for ODP.NET Managed Driver (Oracle.ManagedDataAccess) beta version, I found this order at Oracle Managed and TNS Names :

  1. data source alias in the 'dataSources' section under <oracle.manageddataaccess.client> section in the .NET config file (i.e. machine.config, web.config, user.config).
  2. data source alias in the tnsnames.ora file at the location specified by TNS_ADMIN in the .NET config file.
  3. data source alias in the tnsnames.ora file present in the same directory as the .exe.
  4. data source alias in the tnsnames.ora file present at %TNS_ADMIN%
    (where %TNS_ADMIN% is an environment variable setting).
  5. data source alias in the tnsnames.ora file present at %ORACLE_HOME%networkadmin
    (where %ORACLE_HOME% is an environment variable setting).

In official documentation (12c Release 4 (12.1.0.2.4)) it says:

  1. data source alias in the dataSources section under <oracle.manageddataaccess.client> section in the .NET config file (i.e. machine.config, web.config, user.config).
  2. data source alias in the tnsnames.ora file at the location specified by TNS_ADMIN in the .NET config file. Locations can consist of either absolute or relative directory paths.
  3. data source alias in the tnsnames.ora file present in the same directory as the .exe.

However, based on some tests I made with ODP.NET Managed Driver (4.121.2.0) it takes %ORACLE_HOME%networkadmin and TNS_ADMIN Environment variable into account. Locks like the documentation is not 100% correct.

Wernfried DomscheitWernfried Domscheit
27.4k4 gold badges35 silver badges63 bronze badges

Tnsnames Ora File Path

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