Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TNS: Could not resolve the connect identified specified

Status
Not open for further replies.

droodle

Technical User
Nov 10, 2005
75
AU

OK this is driving me nuts i am trying to setup a ODBC connector to an oracle 10.2.0.4.0 DB

I can connect to the DB by cmd line sqlplus username/password and run queries.

But i have downloaded the latest ODBC connector for oracle 11g (does that matter ?)

The field options i have to populate is

Datasource name:
description:
TNS service name
User ID

when i populate these fields i get the error above using the same username and password

here is my TNSnames.ora

# TNSNAMES.ORA generated for eHealth
EHRP-2E2-SITE1_EHEALTH=
(DESCRIPTION=
(ADDRESS= (PROTOCOL = TCP) (HOST= EHRP-2E2-SITE1)(PORT = 1521))
(CONNECT_DATA=(SID=EHEALTH))
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION=
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EHEALTH))
)
(CONNECT_DATA=
(SID = PLSExtProc)
(PRESENTATION = RO)
)
)

Help

Thanks.
 
Droodle,

What are the contents of your sqlnet.ora (typically in the same folder as your tnsnames.ora) and what are the results of your doing a tns ping on "EHEALTH" (C:\> tnsping ehealth)?

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
“People may forget what you say, but they will never forget how you made them feel.
 
D:\oracle\BIN>tnsping ehealth

TNS Ping Utility for 32-bit Windows: Version 10.2.0.4.0 - Production on 25-AUG-2
011 09:10:11

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:
D:\oracle\network\admin\sqlnet.ora

TNS-03505: Failed to resolve name

D:\oracle\BIN>tnsping ehrp-2e2-site1

TNS Ping Utility for 32-bit Windows: Version 10.2.0.4.0 - Production on 25-AUG-2
011 09:10:40

Copyright (c) 1997, 2007, Oracle. All rights reserved.

Used parameter files:
D:\oracle\network\admin\sqlnet.ora

Used HOSTNAME adapter to resolve the alias
Attempting to contact (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=ehrp-2e2-site1))(
ADDRESS=(PROTOCOL=TCP)(HOST=10.0.2.62)(PORT=1521)))
OK (60 msec)

D:\oracle\BIN>

sqlnet.ora ..

# This file is actually generated by netca. But if customers choose to
# install "Software Only", this file wont exist and without the native
# authentication, they will not be able to connect to the database on NT.


SQLNET.AUTHENTICATION_SERVICES = (NONE)
 
Droodle,

Try these entries in your sqlnet.ora, reattempt your connection, then let us know if there is an improvement:
Code:
SQLNET.AUTHENTICATION_SERVICES = (NTS)
NAMES.DIRECTORY_PATH= (LDAP,TNSNAMES)

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
“People may forget what you say, but they will never forget how you made them feel.
 
Droodle, could you provide some more detail as to what you are actually doing when you successfully log into sqlplus and run queries? So far you haven't provided the results of any command that succeeded in referencing the entry for ehealth in your tnsnames.ora file. The output of your "tnsping ehrp-2e2-site1" command says that it resolved the alias using the HOSTNAME adapter. That means there must be an entry in the hosts file on your computer similar to the following:

Code:
10.0.2.62     ehrp-2e2-site1

If the tnsping had used your tnsnames.ora file, it would have said that it used the TNSNAMES adapter to resolve the alias, not HOSTNAME adapter.
 
Testing indicates that you could also get HOSTNAME resolution if you have ehrp-2e2-site1 defined in DNS.
 
I know its been a while but i'm back to this and still cannot get it to work ..

heres is my oracle db details and you can see i can connect locally ..

C:\Documents and Settings\ehealth>lsnrctl stat

LSNRCTL for 32-bit Windows: Version 10.2.0.4.0 - Production on 17-OCT-2011 16:08:45

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=IPC)(KEY=EHEALTH))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for 32-bit Windows: Version 10.2.0.4.0 - Production
Start Date 30-SEP-2011 10:00:18
Uptime 17 days 6 hr. 8 min. 28 sec
Trace Level off
Security ON: Password or Local OS Authentication
SNMP OFF
Listener Parameter File D:\oracle\Oracle.10.2\network\admin\listener.ora
Listener Log File D:\oracle\Oracle.10.2\network\log\listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\\.\pipe\EHEALTHipc)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=EH63)(PORT=1521)))
Services Summary...
Service "EHEALTH" has 1 instance(s).
Instance "EHEALTH", status UNKNOWN, has 1 handler(s) for this service...
Service "EHEALTH.ca.com" has 1 instance(s).
Instance "EHEALTH", status READY, has 1 handler(s) for this service...
Service "EHEALTH_XPT.ca.com" has 1 instance(s).
Instance "EHEALTH", status READY, has 1 handler(s) for this service...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

C:\Documents and Settings\ehealth>
C:\Documents and Settings\ehealth>
C:\Documents and Settings\ehealth>
C:\Documents and Settings\ehealth>sqlplus ehealth/ehealth

SQL*Plus: Release 10.2.0.4.0 - Production on Mon Oct 17 16:11:01 2011

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

what do i need to connect from a remote Winxp

what i have tried is download a ODBC driver from oracle suppor and add it as a data source but i get the message

WSAECONNREFUSED (10061) Connection refused

do i need to allow remote access on the DB ?
 
Hi,
Your XP machine needs the Oracle Client installed or needs 'wire protocol' ODBC drivers (The ones from Oracle are not, AFAIK, the type that can run without a full client install on the PC.)

Did the ODBC install package you downloaded also include the Oracle Instant Client - If so please post your tnsnames.ora file from the WinXP machine.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Where will the tns names be on my xp server ? All I've been using is the odbc data sources in administrative tools.

If that's not enough can you point me to the right client download and what components need to be installed.

Thanks.
 
windows 32 bit client download from on that page you need the entry "Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (32-bit)"

DO NOT use instant client - this one will not install some of the things you need, and is prone to errors when installing - always use the full client download and do a custom install and be sure to select the ODBC/OLEDB components as these are not installed by default

Once you install the software your TNS names will normally be on ORACLE_HOME/network/admin - this location can be changed if you have variable TNS_ADMIN set and pointing to a different location

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top