ORA-12154 Connection fail

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
jjeffman
Posts: 84
Joined: Tue 09 Nov 2004 12:22
Location: Porto Alegre-Rio Grande do Sul - Brazil

ORA-12154 Connection fail

Post by jjeffman » Fri 15 Jan 2016 14:05

Hello
I am using ODAC version 9.6.21 on C++Builder 6.0 Professional Edition.
I am getting an error while attempting to connect to Oracle 11g database running on the same machine.
The Connect String is as follow:
Data Source=BDJJ;User ID=automa;Password=automa;Use Unicode=True;Login Prompt=False
I am able to connect to the same database with the same user and password using SQL*PLUS.
SQL*Plus: Release 11.2.0.1.0 Production on Sex Jan 15 11:58:07 2016

Copyright (c) 1982, 2010, Oracle. All rights reserved.


Conectado a:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show user
USER is "AUTOMA"
SQL>
C:\Users\jjeffman>tnsping dbjj

TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 15-JAN-2
016 11:52:22

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

Arquivos de parÔmetros usados:
c:\app\jjeffman\product\11.2.0\dbhome_1\network\admin\sqlnet.ora


Usado o adaptador TNSNAMES para resolver o apelido
Tentativa de contatar (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
(HOST = LOCALHOST)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = DBJJ)))
OK (20 ms)
I cannot find any application error. The code I am using used to work on the previous ODAC version.
I have configured the TOraSession at design time using the same connect string and it works fine, not in runtime, though.

Can you please help me?

jjeffman
Posts: 84
Joined: Tue 09 Nov 2004 12:22
Location: Porto Alegre-Rio Grande do Sul - Brazil

Re: ORA-12154 Connection fail

Post by jjeffman » Fri 15 Jan 2016 14:25

Thank you very much.
Never mind. It is my fault: Wrong TNS name.
Best regards.

MaximG
Devart Team
Posts: 1822
Joined: Mon 06 Jul 2015 11:34

Re: ORA-12154 Connection fail

Post by MaximG » Mon 18 Jan 2016 14:10

We are glad to see the problem resolved. Please don't hesitate to contact us with questions concerning ODAC usage.

Post Reply