Page 1 of 1
Cannot connect to RAC setup using TNS
Posted: Sat 04 Dec 2010 18:49
by cbc700
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.
Posted: Mon 06 Dec 2010 12:26
by AlexP
Hello,
Please specify the exact version of Oracle Client and Server and the version of the client OS.
Posted: Wed 08 Dec 2010 02:10
by cbc700
I know overall the Oracle version is 11g (I'll have to ask someone for an exact number).
The client OS is Windows 7 Ultimate 64 bit.
I'm running the 32 bit version of the full Oracle 11.2 client.
My oci.dll is version 11.2.0.1. It was installed in the default location.
Thanks.
Posted: Wed 08 Dec 2010 09:15
by AlexP
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.
Posted: Wed 08 Dec 2010 20:27
by cbc700
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.
Posted: Mon 13 Dec 2010 17:59
by cbc700
Still hoping for a reply to my last post. Thanks!
Posted: Tue 14 Dec 2010 12:16
by ioannisa
Same problem in topic I started few minutes ago.
Posted: Tue 14 Dec 2010 14:12
by bork
Hello
Here is my TNSNAMES.ORA file:
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)
)
)
All works correctly.
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.
Posted: Tue 14 Dec 2010 16:10
by ioannisa
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.
Posted: Fri 17 Dec 2010 12:29
by AlexP
Hello,
ioannisa:
Also please specify the following information:
- the exact version of Oracle Client for both OS's;
- the exact version of UniDAC;
- your tnsnames.ora file.
Posted: Mon 20 Dec 2010 12:21
by ioannisa
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
Posted: Mon 20 Dec 2010 16:19
by AlexP
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.
Posted: Sun 06 Mar 2011 06:32
by cbc700
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.
Posted: Mon 07 Mar 2011 09:12
by AlexP
Hello,
cbc700:
UniDAC can't connect to RAC servers in the direct mode, connection to these servers is possible only in the OCI mode.
Please specify your tnsnames.ora file.