473,406 Members | 2,707 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,406 software developers and data experts.

Tns name Not Found

Hi,

I am new To Oracle.When I am trying to log in Sql* Plus , There It is asking for the USername And Password,I Put that Information .After that it ask me Host string.. What should I Put there.When I put there 127.0.0.1 it says "Tns name Not found". what is the concept of Tns what does it represents.

I found the same error when i try to login in PLSQL developer to do my work.

Can anyone help me.
Mar 4 '09 #1
10 5095
r035198x
13,262 8TB
You need to verify that the credentials you are providing match the ones in the tnsnames.ora file in your oracle directory. If you have the SQL Net Easy Configuration wizard then run it to correct and verify your configuration.
Mar 4 '09 #2
madankarmukta
308 256MB
@r035198x
Then what does the host string represents ..?
Mar 4 '09 #3
@madankarmukta
Hi All,

Thanks for the time you gave to resolve my question .

Anyways madankarmukta,
I am asking Hoststring in the context when we try to login in sql* plus .
Mar 4 '09 #4
debasisdas
8,127 Expert 4TB
host string is the name of the database that you are trying to connect. If you have not specified any other name the default name would be ORCL. If the DB is installed on your pc you need not specify the HOST STRING.
Mar 5 '09 #5
@debasisdas
Okay.. SO the host string is basically the IP address of the machine where the database is installed..Please correct me If I am going wrong.

It means if the oraganizantion is having a shared machine with the Db instyalled on it and the one acting as a oracle server , then while accessing database we need to specify that IP in the host string for login in sql* plus which in turn need to specify in tns.ora file.

Please correct me If I am getting wrong.
Mar 5 '09 #6
debasisdas
8,127 Expert 4TB
you need the name of the database not the IP address of the system.
Mar 5 '09 #7
chaarmann
785 Expert 512MB
@madankarmukta
It represents the host-name, the port number and the database name (= SID, =ServiceID). It can also contain additional non-mandatory parameters.
You can give it directly or you just give a single name as reference.
This single name then is looked up in the tnsnames.ora file.

Example:
as direct string:
"(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = myHostNameOrIp)(PORT = 1526)))(CONNECT_DATA =(SID=myOracleDB))"
or as reference:
"myOra"
If you give it as reference, you must have following entry in tnsnames.ora file:
Expand|Select|Wrap|Line Numbers
  1. myOra=
  2.   (DESCRIPTION =
  3.     (ADDRESS_LIST =
  4.        (ADDRESS =
  5.           (PROTOCOL = TCP)
  6.           (HOST = myHostNameOrIp)
  7.           (PORT = 1526)
  8.        )
  9.     )
  10.     (CONNECT_DATA =
  11.        (SID=myOracleDB)
  12.     )
  13.   )
Buy the way, you can use "tnsping" to see if the connection is ok or not.
Mar 9 '09 #8
Jibran
30
Host String refers to database name or SID.
Mar 10 '09 #9
@chaarmann
Thanks for the detailed and explanatory answer.

So, I need to add the reference in tnsnames.ora file containing protocol ,Host and other information which Oracle server will use during startup.

Thank you very much.
Mar 10 '09 #10
chaarmann
785 Expert 512MB
@NewToOracle
Not necessarily. It is advised, but sometimes you can't do it because you have no rights to modify this file. You have 2 other options:
1.) give the long string directly
2.) make an entry in database table USER_DB_LINKS. Put the long string there in column HOST
Mar 10 '09 #11

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

Similar topics

11
by: Andrew Thompson | last post by:
I have written a few scripts to parse the URL arguments and either list them or allow access to the value of any parameter by name. <http://www.physci.org/test/003url/index.html>...
1
by: Srini | last post by:
I was reading the "Exceptional C++" of Herb Sutter. In an example, he mentions the following. // In some library header: namespace N { class C{}; } int operator+(int i, N::C) { return i+1; }...
14
by: spike | last post by:
Im trying to write a program that should read through a binary file searching for the character sequence "\name\" Then it should read the characters following the "\name\" sequence until a NULL...
4
by: Maarten Verhage | last post by:
Hi All, I've made a modified version of the Expat elements.c example. What I want the program to do is to recognize a hardcoded element-name/tag-name and then execute some code which has access...
2
by: aallee83 | last post by:
i'm new in asp.net after develop my solution i copied it on the server where I want it to run but something cares... WHAT?!?! thank you in advance File or assembly name System, or one of its...
1
by: Olav Tollefsen | last post by:
I get the included error message when trying to run my ASP.NET application under Windows Server 2003 (with all updates installed). How can I troubleshoot this? Olav File or assembly name...
17
by: sounak | last post by:
How could we get a macro name from a macro value such that in a header file #define a 100 #define b 200 now the source file will be such that the user gives 100 then the value is outputted as...
11
by: Alexander Walker | last post by:
Hello I would like to write a method that allows me to pass a reference to an instance of a class, the name of a property of that class and a value to set that property to, the method would then...
11
by: martin DH | last post by:
I have an Access database of employees. Each employee has a unique identification number called "BANNER_ID". Each employee's last name and first name are in the database but are not unique...
1
by: vineetbindal | last post by:
Hi All, I am new to silverlight and i am following a tutorial. In order to connect to database in silverlight application i need to add a referance to a service. which gives me an error that the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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.