Home » RDBMS Server » Networking and Gateways » ODBC 9i not working with onames
ODBC 9i not working with onames [message #66378] Wed, 08 May 2002 08:19 Go to next message
Markus Aegerter
Messages: 1
Registered: May 2002
Junior Member
My sqlnet.ora is configured as
NAMES.DIRECTORY_PATH = (ONAMES)

1. tnsping xyz works
2. If I use the Oracle ODBC-Driver 9.00.13.00, where TNS Service Name points to xyz, the following error occurs: ORA-12154: Could not resolve servicename.
3. If I use the Microsoft ODBC for Oracle-Driver, servicename-resolution by onames works.

What's the problem?

Thanks in advance.

Markus
Re: ODBC 9i not working with onames [message #66379 is a reply to message #66378] Wed, 08 May 2002 09:03 Go to previous message
Grant
Messages: 578
Registered: January 2002
Senior Member
Doc ID: Note:179184.1
Subject: Oracle ODBC Driver Version 9i Returns ORA-12154 Using Oracle Names Server
Type: PROBLEM
Status: PUBLISHED
Content Type: TEXT/PLAIN
Creation Date: 07-MAR-2002
Last Revision Date: 18-MAR-2002


Problem Description
-------------------

ODBC Connections using the 9i ODBC Driver and Client connecting to an Oracle
database using an Oracle Names Server generate the following error:

Unable to connect
SQLState=08004
[[Oracle]][[ODBC]][[ORA]] ORA-12154 TNS could not resolve service name

A single connection from SQL Plus appears to work fine.

Solution Description
--------------------

Upgrade the Client software to version 9.0.1.2 Patch 2 or later, or use a
TNSNames file to connect to the database instead of an Oracle Names Server.

Explanation
-----------

There is a bug in the Oracle client software, Bug:2048583, which errors upon
a second connection attempt in the same session using an Oracle Names Server.
This behavior can be reproduced in SQL*Plus. Connect in SQL*Plus to the
database using the Oracle Names Server and then attempt to connect to the
database again using the same SQL*Plus session. You will see the following
error:

SQL> connect username/password@alias

ERROR:
ORA-12154: TNS:could not resolve service name
Warning: You are no longer connected to ORACLE.

The second connection is what causes the ORA-12154. The reason the Oracle ODBC
Driver appears to generate this error on its initial connection attempt is due
to the way the driver connects. The ODBC driver makes two attempts to connect
to the database. The first attempt tries to autoconnect to the database using
values stored in the registry. If this fails the application is then prompted
for the connection credentials and a second connection is attempted generating
the error.

References
----------

BUG:2095960 - ORA-12154 When Trying to Connect with 9I ODBC Driver Through a
Names Server

BUG:2048583 - Reconnecting from a Session in 9I Net Client on Windows Fails
with ORA-12154

Additional Search Words
-----------------------

ONames
.
Previous Topic: Re: Oracle Networking through proxy server
Next Topic: Remote Database Link
Goto Forum:
  


Current Time: Thu Apr 25 12:11:08 CDT 2024