connect to RAC via TOraSession

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tomos81
Posts: 4
Joined: Fri 22 Aug 2008 08:27
Contact:

connect to RAC via TOraSession

Post by tomos81 » Fri 22 Aug 2008 08:34

Hi all,
is there a solution to connect form TOraSession to Real Application cluster?
I am using version 6.25.1.13 for Delphi7

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Fri 22 Aug 2008 11:08

You should make an alias for RAC in the tnsnames.ora file and assign the alias name to the Server property of TOraSession.

tomos81
Posts: 4
Joined: Fri 22 Aug 2008 08:27
Contact:

Post by tomos81 » Mon 25 Aug 2008 05:49

Plash wrote:You should make an alias for RAC in the tnsnames.ora file and assign the alias name to the Server property of TOraSession.
Hi, I can't connect...
in tnsnames.ora I have this record:

XXX_SERVICE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = XXX1-vip)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = XXX2-vip)(PORT = 1521))
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XXX_service)
)
)



In delphi -> TOraSession:

Direct mode is ON
Prefilled right username and password,
server: XXX1-vip:1521:XXX_SERVICE
login prompt: False
connect mode: cmNormal


but I can't connect...
where is the problem?

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 26 Aug 2008 11:21

The Direct mode does not support RAC. In the Direct mode you can connect only to one server in RAC (if you specify the host, port and service name for that server). The tnsnames.ora file is not used in the Direct mode.

You should connect in OCI mode to use RAC.

tomos81
Posts: 4
Joined: Fri 22 Aug 2008 08:27
Contact:

Post by tomos81 » Tue 26 Aug 2008 11:31

Plash wrote:The Direct mode does not support RAC. In the Direct mode you can connect only to one server in RAC (if you specify the host, port and service name for that server). The tnsnames.ora file is not used in the Direct mode.

You should connect in OCI mode to use RAC.
OK but how to connect to RAC which is in network with TOraSession?

tomos81
Posts: 4
Joined: Fri 22 Aug 2008 08:27
Contact:

Post by tomos81 » Tue 26 Aug 2008 17:00

tomos81 wrote:
Plash wrote:The Direct mode does not support RAC. In the Direct mode you can connect only to one server in RAC (if you specify the host, port and service name for that server). The tnsnames.ora file is not used in the Direct mode.

You should connect in OCI mode to use RAC.
OK but how to connect to RAC which is in network with TOraSession?
I solved that problem:
I downloaded Oracle instant client, set up enviroment variables for TNS_ADMIN (path to oci.dll from Oracle instant client) help is on http://www.oracle.com/technology/tech/o ... ic-faq.htm

in TOraSession:
Direct is false
connection string is: username/password@alias

I have copied tnsnames.ora with my alias (alias from connection string) into oracle instant client directory.
it works fine, fast and stable...

Post Reply