473,480 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

What is the use of tnsnames.ora?

8 New Member
I'm writing an application in ASP.NET using C# for code behind and i'm also using oracle 10g. I thought when i retrieve data from the DB first tnsnames.ora is referred. But my experience is that server name given in web.config is directly connected whether or not entry is present in tnsnames.ora. Then why do we need a tnsnames.ora?
Jun 14 '07 #1
7 8663
debasisdas
8,127 Recognized Expert Expert
It defines the application can connect to which database,server address using which port . its for reference of database.
The web.config file is for webpages not for the database.

a typical entry in tnsname.ora file is as follows.
----------------------------------------------------------------------
Expand|Select|Wrap|Line Numbers
  1. OM =
  2.   (DESCRIPTION =
  3.     (ADDRESS = (PROTOCOL = TCP)(HOST = is-18)(PORT = 1521))
  4.     (CONNECT_DATA =
  5.       (SERVER = DEDICATED)
  6.       (SERVICE_NAME = Om)
  7.     )
  8.   )
  9.  
  10. EXTPROC_CONNECTION_DATA =
  11.   (DESCRIPTION =
  12.     (ADDRESS_LIST =
  13.       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
  14.     )
  15.     (CONNECT_DATA =
  16.       (SID = PLSExtProc)
  17.       (PRESENTATION = RO)
  18.     )
  19.   )
  20.  
  21. MES =
  22.   (DESCRIPTION =
  23.     (ADDRESS_LIST =
  24.       (ADDRESS = (PROTOCOL = TCP)(HOST = 10.35.15.3)(PORT = 1521))
  25.     )
  26.     (CONNECT_DATA =
  27.       (SID = MES)
  28.     )
  29.   )
  30.  
  31. BDCORA =
  32.   (DESCRIPTION =
  33.     (ADDRESS_LIST =
  34.       (ADDRESS = (PROTOCOL = TCP)(HOST = 10.35.12.16)(PORT = 1521))
  35.     )
  36.     (CONNECT_DATA =
  37.       (SERVICE_NAME = orcl1)
  38.     )
  39.   )
  40.  
  41. MESTEST =
  42.   (DESCRIPTION =
  43.     (ADDRESS_LIST =
  44.       (ADDRESS = (PROTOCOL = TCP)(HOST = 10.35.14.155)(PORT = 1521))
  45.     )
  46.     (CONNECT_DATA =
  47.       (SERVICE_NAME = MESTEST)
  48.     )
  49.   )
  50.  
Jun 14 '07 #2
lrg
8 New Member
My application is connecting to a server which isn't entered in tnsnames.ora. Why is this happening?
Jun 14 '07 #3
debasisdas
8,127 Recognized Expert Expert
Is that defined in web.config ???
Jun 14 '07 #4
lrg
8 New Member
Yes, server name is defined in web.config. But how is it possible to find out the correct server from the name alone? No ip address or port no or any other detail is given.
Jun 14 '07 #5
debasisdas
8,127 Recognized Expert Expert
You can use either IP address OR servername.

Because as there can't be more than one system with same IP address there can't be more than one system by the same in the same network.
Jun 14 '07 #6
lrg
8 New Member
thanks a lot. now i'm clear.
Jun 14 '07 #7
debasisdas
8,127 Recognized Expert Expert
Hi
Irg
Welcome to TSDN.

You have reached the right place for knowledge shairing.

Here you will find a vast resource of related topics and code.

Feel free to post more doubts/questions in the forum.

But before that give a try from your side and if possible try to post what/how you have approached to solve the problem.

It will help Experts in the forum in solving/underestanding your problem in a better way.

Please follow the posting guidelines in every new post/reply.

please specify your post/question clearly.

Dont expect others to guess and solve your problem.

Regards

Debasis
Jun 14 '07 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3046
by: thecrow | last post by:
Alright, what the hell is going on here? In the following code, I expect the printed result to be: DEBUG: frank's last name is burns. Instead, what I get is: DEBUG: frank's last name is...
220
18790
by: Brandon J. Van Every | last post by:
What's better about Ruby than Python? I'm sure there's something. What is it? This is not a troll. I'm language shopping and I want people's answers. I don't know beans about Ruby or have...
699
33295
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro...
92
6323
by: Reed L. O'Brien | last post by:
I see rotor was removed for 2.4 and the docs say use an AES module provided separately... Is there a standard module that works alike or an AES module that works alike but with better encryption?...
137
6914
by: Philippe C. Martin | last post by:
I apologize in advance for launching this post but I might get enlightment somehow (PS: I am _very_ agnostic ;-). - 1) I do not consider my intelligence/education above average - 2) I am very...
1
5125
by: Adam Ruth | last post by:
I'm using OCI on Mac OS X and I've run into a strange problem with my TNSNAMES.ORA file. My TNSNAMES.ORA file has one entry INV4II and it works fine. However, it will only work if that is the...
6
4667
by: bdj | last post by:
Hello! I have at set of tnsnames.ora. I wich to make an union, e.g. a single file of it. How can I do that easy? Greetings Bjørn
2
43451
by: Dwie | last post by:
Dear All, I'm a new in Oracle DB. I'm using Windows 2000 as server and Windows XP as client. I installed Oracle Enterprise on server and Oracle 8.1 on clients. I have some client with 2 different...
0
3484
by: wolfee | last post by:
I'm running 10gR2 RAC in Prod, Test and DEV and after doing a clone to the DEV environment I'm getting a wierd ORA-12514 error for only one node. I can tnsping the node and it comes back fine. ...
0
7039
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7080
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
6895
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5326
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4770
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4476
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1296
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
558
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
176
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.