Question

I am currently testing Delphi XE5 to decide if we upgrade to it. I have stumbled upon what seems to be an IDE configuration problem.

As we work with Oracle (11g Release 11.2.0.3.0 - 64bit Production) I was trying to setup both a TFDConnection and a TSQLConnection and connect to the database at design time just for testing purposes.

For some reason both are failing with error ORA-12154, but only at design time. If I leave the connections configured and activate them at runtime it works fine. For example, I can retrieve data from the database.

I am specifying the database using tnsnames.ora description. Following you can see the Firedac connection definition (dbExpress connection configuration uses the same database, user, etc.):

Firedac connection definition

And the environment report:

================================
Connection definition parameters
================================
Database=DBDES01_NEW
User_Name=SMILO_PRD
Password=*****
DriverID=Ora
================================
FireDAC info
================================
Tool = RAD Studio XE5
FireDAC = 9.0.1 (Build 63974)
Platform = Windows 32 bit
Defines = FireDAC_NOLOCALE_META;FireDAC_MONITOR
================================
Client info
================================
Loading driver Ora ...
  Variable [Explicit Oracle Home]: [E:\oracle\product\10.2.0\client_1\]
  Variable [Explicit OCI]: [E:\oracle\product\10.2.0\client_1\BIN\oci.dll]
  Searching for Instant Client ...
    Not found !
  Searching for Oracle Home ...
    Checking Oracle Home at key [\Software\Oracle] ...
    Checking Oracle Home at key [\Software\Oracle\KEY_OraClient10g_home1] ...
      Found [E:\oracle\product\10.2.0\client_1\bin\oci.dll], position [2147483647], in [reg: \Software\Oracle\KEY_OraClient10g_home1]
Home = E:\oracle\product\10.2.0\client_1
Version = 1002000100
OCI DLL name = E:\oracle\product\10.2.0\client_1\bin\oci.dll
TNSNAMES dir = E:\oracle\product\10.2.0\client_1\Network\Admin\tnsnames.ora
NLS_LANG = SPANISH_SPAIN.WE8MSWIN1252
================================
Session info
================================
Failed to connect to DBMS !
[FireDAC][Phys][Ora] ORA-12154: TNS:no se ha podido resolver el identificador de conexión especificado

Connection by using the tnsnames.ora works correctyl when used from TOAD, my older Delphi 2006 installation and if I activate the connections during runtime.

The problem must lie somewhere in my IDE configuration. So far I could not find any solution for this. Any ideas on what I could check for?

Was it helpful?

Solution

There's a bug in older versions of the Oracle Client that will result in an ora-12154 if the calling application is in a directory path that contains parenthesis characters (which will happen for 32bit applications installed on 64bit Windows, including the Delphi IDE.) Oracle fixed the bug in the 11.2 and newer clients (and I've seen it on some 11.2 systems.) The Oracle Bug number for this is #3807408. There's some more info in my faq page http://www.benthicsoftware.com/faq.html.

OTHER TIPS

I came across this thread searching for answers because we have a similar problem... within our Delphi IDE design time Oracle connections won't work but at run time it's all fine.

Within our corporate environment our machines have a forced specific ("older") Oracle client version, as per earlier response about an Oracle client bug.

At design time, the application that's invoking the Oracle client is Delphi itself, not the project .exe. On a 64 bit install the default paths for Delphi have bracketed text to describe the OS version.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top