Solved

tnsnames.ora location

Posted on 2006-11-07
9
54,265 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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
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
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

688 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