Solved

tnsnames.ora location

Posted on 2006-11-07
9
54,044 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 77

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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying 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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…

696 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