473,387 Members | 1,892 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,387 software developers and data experts.

Oracle Connection

rsrinivasan
221 100+
Hi all,
I need to connect local database from oracle. When i give username and password and service name, it throws error "TNS name could not be resolved".

What should i change in tnsnames file?

Thanks in advance
Srinivas r.
Jun 26 '07 #1
6 1382
debasisdas
8,127 Expert 4TB
The following is a sample of typical entry in tnsnames.ora file.
the first one is the name of database next host name or ipaddress and port number etc
u need to change your file accordingly
donot delete the old entries.
add new eentries

Expand|Select|Wrap|Line Numbers
  1. DEBASIS =
  2.   (DESCRIPTION =
  3.     (ADDRESS = (PROTOCOL = TCP)(HOST = is-18)(PORT = 1521))
  4.     (CONNECT_DATA =
  5.       (SERVER = DEDICATED)
  6.       (SERVICE_NAME = DEBASIS)
  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. BDCORA =
  31.   (DESCRIPTION =
  32.     (ADDRESS_LIST =
  33.       (ADDRESS = (PROTOCOL = TCP)(HOST = 10.35.12.16)(PORT = 1521))
  34.     )
  35.     (CONNECT_DATA =
  36.       (SERVICE_NAME = orcl1)
  37.     )
  38.   )
  39.  
  40. MESTEST =
  41.   (DESCRIPTION =
  42.     (ADDRESS_LIST =
  43.       (ADDRESS = (PROTOCOL = TCP)(HOST = 10.35.14.155)(PORT = 1521))
  44.     )
  45.     (CONNECT_DATA =
  46.       (SERVICE_NAME = MESTEST)
  47.     )
  48.   )
  49.  
Jun 26 '07 #2
rsrinivasan
221 100+
The following is a sample of typical entry in tnsnames.ora file.
the first one is the name of database next host name or ipaddress and port number etc
u need to change your file accordingly
donot delete the old entries.
add new eentries

Expand|Select|Wrap|Line Numbers
  1. DEBASIS =
  2.   (DESCRIPTION =
  3.     (ADDRESS = (PROTOCOL = TCP)(HOST = is-18)(PORT = 1521))
  4.     (CONNECT_DATA =
  5.       (SERVER = DEDICATED)
  6.       (SERVICE_NAME = DEBASIS)
  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. BDCORA =
  31.   (DESCRIPTION =
  32.     (ADDRESS_LIST =
  33.       (ADDRESS = (PROTOCOL = TCP)(HOST = 10.35.12.16)(PORT = 1521))
  34.     )
  35.     (CONNECT_DATA =
  36.       (SERVICE_NAME = orcl1)
  37.     )
  38.   )
  39.  
  40. MESTEST =
  41.   (DESCRIPTION =
  42.     (ADDRESS_LIST =
  43.       (ADDRESS = (PROTOCOL = TCP)(HOST = 10.35.14.155)(PORT = 1521))
  44.     )
  45.     (CONNECT_DATA =
  46.       (SERVICE_NAME = MESTEST)
  47.     )
  48.   )
  49.  
Hi,
I changed my TNS file as

Expand|Select|Wrap|Line Numbers
  1. sri =
  2.   (DESCRIPTION =
  3.     (ADDRESS_LIST =
  4.       (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
  5.     )
  6.     (CONNECT_DATA =
  7.       (SERVICE_NAME = sri)
  8.     )
  9.   )
Still I have the same error. What to do?
Thanks,
Srinivas r.
Jun 26 '07 #3
debasisdas
8,127 Expert 4TB
please reply to these

1.yours is a standalone pc or network pc.

2.do u have multiple databases in the same system.

3.You are trying to connect from client machine or server machine.
Jun 26 '07 #4
rsrinivasan
221 100+
please reply to these

1.yours is a standalone pc or network pc.

2.do u have multiple databases in the same system.

3.You are trying to connect from client machine or server machine.

1. My pc is network pc.
2. Till now i did not create any database in my local PC. I want to create a database in my local system. Because my server has some problem.
3.I want to connect my local machine to oracle.

Thanks,
Srinivas r.
Jun 26 '07 #5
debasisdas
8,127 Expert 4TB
1. My pc is network pc.
if your pc is in network how u are using 127.0.0.1 as your ip address

either use the system IP address or system name
Jun 26 '07 #6
hi
This is mukta answering to ur '?'...
First check ur database services ,
PLZ CKECK ur listener files...
& also listener service.




Hi all,
I need to connect local database from oracle. When i give username and password and service name, it throws error "TNS name could not be resolved".

What should i change in tnsnames file?

Thanks in advance
Srinivas r.
Jun 27 '07 #7

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

Similar topics

3
by: Harry | last post by:
Using Oracle 8i enterprise on win 2000 (sp3) Installed the standard configuration & whenever I make a connection it takes about 10 secs. It's running on a P1900 with 1gb Ram so no reason there...
5
by: SerGioGio | last post by:
Hello, I am going nuts. I am trying to connect to my local ORACLE instance using ODBC. It used to work few weeks ago, but it fails now. Connection with: - SQL*plus: connection works! -...
1
by: Cliff Cooley | last post by:
Can anybody suggest what may be causing the following problem ? I have an ASP script that opens a connection to an Oracle database using a DSN connection string, such as : Set dbConn=...
1
by: Andrew Arace | last post by:
I scoured the groups for some hands on code to perform the menial task of exporting table data from an Access 2000 database to Oracle database (in this case, it was oracle 8i but i'm assuming this...
9
by: mcbill20 | last post by:
Hello all. I just installed Oracle 10g developer tools on a machine running XP Pro and Office XP. Before this I had just the Oracle 9 client installed. I the previous configuration, I was able to...
0
by: ʹÃûÑï | last post by:
ORA-03114: not connected to ORACLE && MS's Bug?? DataBase:Oracle 817 using OracleClient,net framework 1.1 I'm using ADO.Net in C# with Oracle 817. and following is my public data access...
0
by: Anonymous User | last post by:
Hi, I am working on a mobile application that consists of a number of handheld scanners, an Xml Web service and an Oracle 9i database in a highly secure environment. The .Net Compact Framework...
2
by: Ben | last post by:
Hi, I have a problem connecting to Oracle using and ODBC connection in a ASP.Net web page. The TNS Names works fine because when I create a DSN it works, and it works in SQL Plus. Here are...
7
by: D. Patrick | last post by:
I need to connect to an Oracle database. I've never done it before. I see that with framework 1.1 you had to download ODP.NET from Oracle's site in order for the framework classes to even work....
7
by: =?Utf-8?B?QVRT?= | last post by:
HOWTO Run multiple SQL statements from ASP/ADO to an Oracle 10g. Please help, I'm trying to write an ASP page to use ADO to run a long query against an Oracle 10g database, to create tables,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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
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
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...

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.