473,407 Members | 2,315 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

What is the use of tnsnames.ora?

8
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 8661
debasisdas
8,127 Expert 4TB
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
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 Expert 4TB
Is that defined in web.config ???
Jun 14 '07 #4
lrg
8
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 Expert 4TB
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
thanks a lot. now i'm clear.
Jun 14 '07 #7
debasisdas
8,127 Expert 4TB
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
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
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
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
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
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
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
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
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
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
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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
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,...
0
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...

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.