Solved

tnsnames.ora location

Posted on 2006-11-07
9
53,910 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
  • 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 76

Assisted Solution

by:slightwv (䄆 Netminder)
slightwv (䄆 Netminder) earned 25 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 100 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

856 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