472,789 Members | 1,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

What is the use of tnsnames.ora?

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 8630
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 =
  3.     (ADDRESS = (PROTOCOL = TCP)(HOST = is-18)(PORT = 1521))
  4.     (CONNECT_DATA =
  5.       (SERVER = DEDICATED)
  6.       (SERVICE_NAME = Om)
  7.     )
  8.   )
  11.   (DESCRIPTION =
  12.     (ADDRESS_LIST =
  13.       (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
  14.     )
  15.     (CONNECT_DATA =
  16.       (SID = PLSExtProc)
  17.       (PRESENTATION = RO)
  18.     )
  19.   )
  21. MES =
  22.   (DESCRIPTION =
  23.     (ADDRESS_LIST =
  24.       (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))
  25.     )
  26.     (CONNECT_DATA =
  27.       (SID = MES)
  28.     )
  29.   )
  31. BDCORA =
  32.   (DESCRIPTION =
  33.     (ADDRESS_LIST =
  34.       (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))
  35.     )
  36.     (CONNECT_DATA =
  37.       (SERVICE_NAME = orcl1)
  38.     )
  39.   )
  41. MESTEST =
  42.   (DESCRIPTION =
  43.     (ADDRESS_LIST =
  44.       (ADDRESS = (PROTOCOL = TCP)(HOST = = 1521))
  45.     )
  46.     (CONNECT_DATA =
  47.       (SERVICE_NAME = MESTEST)
  48.     )
  49.   )
Jun 14 '07 #2
My application is connecting to a server which isn't entered in tnsnames.ora. Why is this happening?
Jun 14 '07 #3
8,127 Expert 4TB
Is that defined in web.config ???
Jun 14 '07 #4
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
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
thanks a lot. now i'm clear.
Jun 14 '07 #7
8,127 Expert 4TB
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.


Jun 14 '07 #8

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

Similar topics

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...
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...
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...
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?...
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...
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...
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
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...
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. ...
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.