Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

tnsnames.ora location

Posted on 2006-11-07
9
Medium Priority
?
54,699 Views
Last Modified: 2011-08-18
in solaris system the the location of tnsnames.ora is searched
First: ".tnsnames.ora" at users's home directory
Second: TNS_ADMIN
third: /var/opt/oracle
Fourth: ORACLE_HOME/network/admin

1. Is this order common for all unix systems
2. What is the search order in oracle Windows platform
0
Comment
Question by:josephsonnd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
9 Comments
 
LVL 7

Expert Comment

by:Stephen Lappin
ID: 17890397
The default locations for TNSNAME.ORA and SQLNET.ORA files are:

    * Windows 3.x client

ORAWIN\NETWORK\ADMIN directory

    * Windows 95/98 client

SQL*Net 2.x - ORAWIN95\NETWORK\ADMIN
Net8 - ORAWIN95\NET80\admin
Net8i - ORACLE\ORA81\NETWORK\ADMIN

    * Windows NT client

SQL*Net 2.x - ORANT\NETWORK\ADMIN
Net8 - ORANT\NET80\ADMIN
Net8i - ORACLE\ORA81\NETWORK\ADMIN

    * UNIX Client

$ORACLE_HOME/NETWORK/ADMIN
or          /etc
or          /var/opt/oracle
0
 
LVL 7

Expert Comment

by:Stephen Lappin
ID: 17890416
The Oracle Networking product's search for configuration files is not standard across platforms and may change from version to version.

Windows NT/2000 running Oracle 9i
    First: The directory where the application is launched.  For example, if sqlplus resides in
            ORACLE_HOME\bin\sqlplus but was launched from the c:\temp directory, then
            c:\temp is searched for a tnsnames.ora file.
    Second: The value of the TNS_ADMIN environment variable.
    Third: ORACLE_HOME\network\admin

Sun Solaris running Oracle 8i or 9i
    First: The oracle user's home directory is searched for a hidden '.tnsnames.ora'
    Second: The value of the TNS_ADMIN environment variable.
    Third: /var/opt/oracle
    Fourth: $ORACLE_HOME/network/admin

Note: The PATH environment variable may introduce differences into the behavior of the search.  Clients logged on to a Novell network may also inadvertently pull configuration files from an alternate location.

Determining an operating system's search path for the Oracle configuration files is very easy.  On Windows NT, a freeware utility called 'filemon' may be used which displayed all files accessed during the execution of an application (like sqlplus).  On UNIX, a truss-like utility should be used that can generate output of files an application tried to access.  In both cases, remove the tnsnames.ora file, run the appropriate OS monitor utility, and search for all occurrences of the word 'tnsnames'.

0
 

Author Comment

by:josephsonnd
ID: 17890576
lappins,

Thanks, Are you looking at Note:114085.1 :)

If the user on windows xp, does not have access to windows registry, is there a way to find ORACLE_HOME location. This would enable the user to search for ORACLE_HOME/network/admin/tnsnames.ora
0
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

 
LVL 77

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 100 total points
ID: 17890638
>>is there a way to find ORACLE_HOME location

If properly set up, ORACLE_HOME should be an environment variable.  From a cmd prompt:  echo %ORACLE_HOME%
0
 

Author Comment

by:josephsonnd
ID: 17890712
slightwv,

Only the clients are installed for users, NOT databases. Hence the variable %ORACLE_HOME% is not set.
Howevere the PATH contains ORACLE_HOME/bin.

I am trying to see if I can locate the ORACLE_HOME without debugging %PATH%
0
 
LVL 7

Expert Comment

by:Stephen Lappin
ID: 17890748
Looking in C:\Windows\System32\oradim.log may give clues.

I take it that they can view Windows Services tool either. The version of SQL*Plus that they run will be in the bin directory of the Oracle home.

So it if was at c:/oracle/db1/bin  then tnsnames should be in c:/oracle/db1/network/admin

0
 

Author Comment

by:josephsonnd
ID: 17890957
lappins,

oradim.log could not be found. Do you knowthe location of installation log ? May be the installation log would have entry for ORACLE_HOME environment
0
 
LVL 7

Expert Comment

by:Stephen Lappin
ID: 17890983
Sorry,
oradim.log would only be on a Pc with a database on it.
Either go with the parent directory of the sqlplus.exe as the ORACLE_HOME, or do a search of all files on your local hard drive.
0
 
LVL 7

Accepted Solution

by:
Stephen Lappin earned 400 total points
ID: 17891025
Or.....

Have a look in oracle installer logs.
They should be in C:\Program Files\Oracle\Inventory\logs\installActions*.log

Near the top of a log file, you shoudl see an entries like these:

*** File Locations Page***
FromLocation = FROM_LOCATION = D:\stage\products.jar
ToLocation = ORACLE_HOME = C:\oracle\ora92
ToName = ORACLE_HOME_NAME = OraHome92
Initializing installer access setup
Setting value of ORACLE_HOME to C:\oracle\ora92
Setting value of ORACLE_HOME_KEY to Software\ORACLE\HOME0
Setting value of ORACLE_HOME_FOLDER to Oracle - OraHome92
Setting value of ORACLE_HOME_SERVICE to OraHome92
Setting value of ToplevelComp to oracle.server, 9.2.0.1.0, >0.0.0.0.0, [ 912 ][OH:2]
....
...
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question