Menu
Having multiple TNSNAMES.ORA files on a system could cause unexpected (ORA-12154: TNS: could not resolve service name or SQL*NET Unable to resolve service name ) errors even though a valid service name exists in one of the TNSNAMES.ORA files on the system. These errors are seen when trying to create new or open existing RequisitePro projects that use an Oracle back-end database. Is it due to having multiple tnsname.ora files on the same machine.No, every application looks for its own tnsnames.ora, and if you get errors, then it means that something is wrong, not necessarily with tnsnames.ora.
The following is database administration tip #4 from '30 tips in 30 minutes,' brought to you by the IOUG. Return to the main page for more tips on this topic.
If you are having trouble with your database connection, you may need to examine which tnsnames file you are using. If you have many tnsnames files on your machine, you may not be reading the one you think you are.
You can have a local version and a system version. When a client connection is requested the service name or parameter is first searched in the local version of this configuration file. If the service is not found in the local version it is searched in the system version.
The system version is located in the '$ORACLE_HOMENET80ADMIN' directory for Oracle8.0 software. The system version is located in the '$ORACLE_HOMENETWORKADMIN' directory for Oracle7, 8i and 9i software. A local version can exist in the current working directory where the application is running. For example, if, on Windows NT you start SQL*Plus in '$ORACLE_HOMEBIN', then Net8 looks for a local TNSNAMES.ORA in 'ORANTBIN' before looking for the system version. The connection hassles increase when you have multiple local files in various directories.
Manage only TNSNAMES.ORA file exist and that it be located in a single directory. On Unix platforms, setting the environment variable $TNS_ADMIN= will direct Net8 to look for the file in that location. On Windows NT, the TNS_ADMIN in located in the registry. Place the Net8 configuration files in a single directory. Then set the TNS_ADMIN environment variable to point to that one directory.
Get more tips in minutes! Return to the main page.
About the author: Kenny Smith has been working with Oracle technology on HP servers for over a decade. He specializes in Oracle database architecture, database administration and development. He has presented at numerous Oracle conferences on two continents. He has published many articles describing Oracle solutions and has co-authored 'Oracle backup and recovery 101' from Oracle Press.
IOUG: Become a member of the IOUG to access the paper referenced here and a repository of technical content created for Oracle users by Oracle users.
Active3 years, 5 months ago
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?
bernd_kbernd_k6,6732222 gold badges6868 silver badges105105 bronze badges
Tnsnames Ora File
3 Answers
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
Justin CaveJustin CaveTNS_ADMIN
setting before looking for an entry in the local Oracle Home's tnsnames.ora file.17.7k22 gold badges3939 silver badges5151 bronze badges
On windows Oracle Locator Express is a simple (and free) tool to handle setting the oracle home and/or the TNS_ADMIN environment variable.
Leigh RiffelLeigh Riffel20.6k1414 gold badges7070 silver badges139139 bronze badges
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.
Tnsnames.ora Location
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
Mar 21, 2008 This is the films climax so if you haven't seen the movie and plan to, please don't watch. Otherwise, enjoy! Skip navigation Sign in. Flesh Feast (1970) FrightNight7387. Torrent flesh feast movie.
artybugartybug