Solved

how to obtain tnsnames.ora location from registry

Posted on 2001-08-21
7
4,316 Views
Last Modified: 2008-03-03
how to obtain tnsnames.ora location from registry.

for the install shield I need to know whether the tnsnames already exist on the local machine or what. depening on it the new tnsnames would be copied over backedup .... etc.
0
Comment
Question by:agatagog
[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
7 Comments
 

Expert Comment

by:wandidj1
ID: 6410068
if you work with windows NT - oracle, you just search for the file name - tnsnames.ora on your oracle_home directory.
it will produce 2 result - one of it is the real one - the other is the sample.
The real will be in network or net8/admin and the sample will be in net8/admin/sample.


wandi
0
 
LVL 2

Expert Comment

by:RMZ
ID: 6410119
HI
loccalmachine-software-oracle-net80
---rmz---
0
 
LVL 3

Accepted Solution

by:
ramkb earned 50 total points
ID: 6410314
Hi,

It actually depends on the ORACLE_HOME variable.  B'coz you can have multiple version set of products installed in different ORACLE_HOMEs and potentially using different TNSNAMES.ORA

Under HKLM\SOFTWARE\ORACLE, there may be HOMEx (Eg. HOME0, HOME1) representing each ORACLE_HOME.  You can get the ORACLE_HOME variable from there.  You should append "NETWORK\ADMIN" to that value.

The catch is there is another variable TNS_ADMIN which can be set by the user which overrides the default location.  If this variable is set, Oracle looks for network configuration files (TNSNAMES.ORA, SQLNET.ORA) at this location.

Hope this helps..
- Ramesh
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 5

Expert Comment

by:sora
ID: 6410491
Check if a reg entry called TNS_ADMIN is defined in your reg under Software/Oracle. If so, this entry points to the location. If not, it should be Net80/Admin or Network/Admin (as other have already pointed out)


sora
0
 

Author Comment

by:agatagog
ID: 6411702
Thanks
I already new it more or less you just confirmed my knoledge.but depdening on the oracle version ... 8.05 or 8.1.7 the locations are different. there for I thought that there is a key that specificaly holds the location of tnsnames.ora. I guess not. so I do have to have different "if's" depending on oracle version looking for it in //oracle/ora81/network/admin
or //orant/net80/admin.
are there any other options of tnsnames.ora location with any newer or older oracle versions ? like 7.or 9.?
0
 

Author Comment

by:agatagog
ID: 6411709
Thanks
I already knew it more or less you just confirmed my knoledge.but depdening on the oracle version ... 8.05 or 8.1.7 the locations are different. there for I thought that there is a key that specificaly holds the location of tnsnames.ora. I guess not. so I do have to have different "if's" depending on oracle version looking for it in //oracle/ora81/network/admin
or //orant/net80/admin.
are there any other options of tnsnames.ora location with any newer or older oracle versions ? like 7.or 9.?
0
 

Author Comment

by:agatagog
ID: 6411711
Thanks
I already knew it more or less you just confirmed my knowledge. But depending on the oracle version ... 8.05 or 8.1.7 the locations are different. Therefore I thought that there is a key that specifically holds the location of tnsnames.ora. I guess not. So I do have to have different "if's" depending on oracle version looking for it in //oracle/ora81/network/admin or //orant/net80/admin.
Are there any other options of tnsnames.ora location with any newer or older oracle versions? Like 7.or 9.?
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

717 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