Cannot connect to RAC setup using TNS
Cannot connect to RAC setup using TNS
I am having trouble getting UniDAC to connect to a RAC setup via TNS (non-direct). In design mode, I've specified the usename, password, and have selected the appropriate alias in the server dropdown (it is correctly populated with all the aliases from TNSNAMES.ORA). Of course, Direct is set to false.
When I attempt to connect, I consistently receive:
ORA-12154: TNS:could not resolve the connect identifier specified
If I set up the exact same connection is SQL Developer, I can connect without trouble.
Here is my TNSNAMES.ORA file:
mydb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = mydb-cluster)(PORT = 1521))
(LOAD_BALANCE = yes)
(FAILOVER = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mydb)
)
)
I'm using the latest version of UniDAC (3.5.0.13) under Delphi 2010. And I'm using the full client (32 bit).
Thanks.
When I attempt to connect, I consistently receive:
ORA-12154: TNS:could not resolve the connect identifier specified
If I set up the exact same connection is SQL Developer, I can connect without trouble.
Here is my TNSNAMES.ORA file:
mydb =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = mydb-cluster)(PORT = 1521))
(LOAD_BALANCE = yes)
(FAILOVER = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = mydb)
)
)
I'm using the latest version of UniDAC (3.5.0.13) under Delphi 2010. And I'm using the full client (32 bit).
Thanks.
Hello,
Unfortunately I can not reproduce the problem.
I have tested it on the same configuration: Windows 7 x64, Oracle Client 11.2. x32, Delphi 7 and XE, and all works fine.
Please try to connect in the run-time mode.
Also please check the correct settings the TNS_ADMIN values in the registry and in the Environment variables.
We have the same problem with the Oracle XE client, it is caused by the Oracle XE client behavior.
If the application that tries to connect to Oracle is located in a folder the name of which contains brackets - '(' or ')' ,
then client cannot resolve the connection identifier. But in the other Oracle clients the problem doesn't arise.
Unfortunately I can not reproduce the problem.
I have tested it on the same configuration: Windows 7 x64, Oracle Client 11.2. x32, Delphi 7 and XE, and all works fine.
Please try to connect in the run-time mode.
Also please check the correct settings the TNS_ADMIN values in the registry and in the Environment variables.
We have the same problem with the Oracle XE client, it is caused by the Oracle XE client behavior.
If the application that tries to connect to Oracle is located in a folder the name of which contains brackets - '(' or ')' ,
then client cannot resolve the connection identifier. But in the other Oracle clients the problem doesn't arise.
Thanks.
Just for reference, my full client path is C:\app\carlton\product\11.2.0\client_1. And there is a BIN subfolder full of binaries (and many other subfolders).
Could you please post your TNSNAMES.ORA file.
Are you sure your TNS file specifics a RAC set up with a service name reference, and not a direct reference using an SID?
Could your answer in my other post about service name support coming for direct mode be part of the issue (as in UniDAC might not support service names yet under any circumstances)?
Thanks.
Just for reference, my full client path is C:\app\carlton\product\11.2.0\client_1. And there is a BIN subfolder full of binaries (and many other subfolders).
Could you please post your TNSNAMES.ORA file.
Are you sure your TNS file specifics a RAC set up with a service name reference, and not a direct reference using an SID?
Could your answer in my other post about service name support coming for direct mode be part of the issue (as in UniDAC might not support service names yet under any circumstances)?
Thanks.
Hello
Here is my TNSNAMES.ORA file:
Maybe your SQL Developer is using x64 Oracle client and can connect successfully. Please try to connect to another server without Balancing and Failover support. Also please define Homename correctly, because Delphi compiles Win32 applications only and cannot use x64 DLL (and required Win32 Oracle client). So you should set the Win32 Oracle client to your Homename property. And please check that TNSNAMES.ORA files for x64 Oracle client and for Win32 Oracle Client are the same.
We are working for supporting Service name in the Direct mode. As soon as Service names will be supported in the direct mode we will notify you.
to ioannisa
Please specify your Oracle Client and Server versions and your client OS version. If they are the same as cbc700's ones then please try to connect to standard Oracle server by Win32 Oracle client (see advices before).
I am waiting for results.
Here is my TNSNAMES.ORA file:
All works correctly.ORCL1110_FO =
(DESCRIPTION =
(ADDRESS_LIST =
(FAILOVER=on)
(LOAD_BALANCE=on)
(ADDRESS = (PROTOCOL = TCP)(HOST = dboracle)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = dboracle)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = dboracle)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = ORCL1110)
)
)
Maybe your SQL Developer is using x64 Oracle client and can connect successfully. Please try to connect to another server without Balancing and Failover support. Also please define Homename correctly, because Delphi compiles Win32 applications only and cannot use x64 DLL (and required Win32 Oracle client). So you should set the Win32 Oracle client to your Homename property. And please check that TNSNAMES.ORA files for x64 Oracle client and for Win32 Oracle Client are the same.
We are working for supporting Service name in the Direct mode. As soon as Service names will be supported in the direct mode we will notify you.
to ioannisa
Please specify your Oracle Client and Server versions and your client OS version. If they are the same as cbc700's ones then please try to connect to standard Oracle server by Win32 Oracle client (see advices before).
I am waiting for results.
I am sorry to object, but
The very same project. Compiled at x86 pc with Delphi7, runs on PC with x64 faulty connection.
The very same project. Compiled at x64 pc with DelphiXE, doesn't run on itself.
In both cases the exe file is a x86 application since both delphi7 and delphiXE produce 32bit applications. We are talking about the same project being compiled at the two different versions of delphi! So I don't think it has to do with the oracle and OCI.DLL or I would have problem on the project being compiled at Delphi7 as well.
I still belive its the delphiXE version of the component being installed on 64bit machine running DelphiXE that is responsible for the problem. Ofcourse I might be wrong.
I might be wrong, however I will try what you say tomorrow and let you know.
The very same project. Compiled at x86 pc with Delphi7, runs on PC with x64 faulty connection.
The very same project. Compiled at x64 pc with DelphiXE, doesn't run on itself.
In both cases the exe file is a x86 application since both delphi7 and delphiXE produce 32bit applications. We are talking about the same project being compiled at the two different versions of delphi! So I don't think it has to do with the oracle and OCI.DLL or I would have problem on the project being compiled at Delphi7 as well.
I still belive its the delphiXE version of the component being installed on 64bit machine running DelphiXE that is responsible for the problem. Ofcourse I might be wrong.
I might be wrong, however I will try what you say tomorrow and let you know.
I posted all this info at my own thread by bork told me that I should not post duplicate threads as its similar problem to this thread and told me to continue on this one.
http://www.devart.com/forums/viewtopic.php?t=19759
On the link above is the info you ask
http://www.devart.com/forums/viewtopic.php?t=19759
On the link above is the info you ask
Hello,
Please make sure that a firewall is disabled.
Please check what you have only one Oracle Client installed and that it it is a x32 application.
Please check what you have only one tnanames.ora file.
Please try installing the latest Oracle Client, or try connecting using Oracle Instant Client.
I can successfully connect from both Delphi XE and Delphi 7 in both modes.
Please make sure that a firewall is disabled.
Please check what you have only one Oracle Client installed and that it it is a x32 application.
Please check what you have only one tnanames.ora file.
Please try installing the latest Oracle Client, or try connecting using Oracle Instant Client.
I can successfully connect from both Delphi XE and Delphi 7 in both modes.
Would you be able to try it from Delphi 2010 since that remains a configuration that still shows the trouble? With that RAC setup I am trying to get to, with the 3.60.0.15 version, I have been unable to connect in direct mode with a service name or via non-direct mode. Only connections to one instance is possible in direct mode.
Could this be something specific to Delphi 2010?
Even after reviewing your previous list (firewall, etc.), the problem persists.
Thanks.
Could this be something specific to Delphi 2010?
Even after reviewing your previous list (firewall, etc.), the problem persists.
Thanks.