Solved

tnsnames.ora location

Posted on 2006-11-07
9
53,599 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:lappins
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:lappins
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
 
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
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.

 

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:lappins
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:lappins
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:
lappins 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

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.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Cross Outer Join 4 52
one-way data "masking" MD5 sql 26 103
PL/SQL - Leading zeros 7 41
What is the version of ojdbc6.jar 2 24
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now