Solved

how to obtain tnsnames.ora location from registry

Posted on 2001-08-21
7
4,196 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
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…
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.

730 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