Ora Session Problem

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
inglortasartir
Posts: 1
Joined: Tue 14 Feb 2017 08:31

Ora Session Problem

Post by inglortasartir » Tue 14 Feb 2017 08:36

Hello,
I have an oracle database which works as clusters. My Oracle database has two different IP address and I want to make an OraSession with them. The issue here is, how can I check and control which of the database ip ( cluster is active ).
For example
Db1 with ip xx.xx.xx.11
Db2 with ip xx.xx.xx.12
Only one of them is active and it switches from 11 to 12 or 12 to 11 sometimes depending on load balancer.
How can I control this with Orasession component in delphi 7?

Thank you in advance

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

Re: Ora Session Problem

Post by MaximG » Thu 23 Feb 2017 08:28

ODAC supports Oracle RAC. When using the OCI mode, connection parameters are set in TNSNAMES.ORA, and RAC is accessed similarly to connection to a single Oracle instance. In Direct Mode, the following connection string is used:

Code: Select all

ConnectString := 'Provider Name=Oracle;Direct=True;Server=DBServer1,DBServer2;Port=1521;SID=ORCL;User ID=scott;Password=tiger';
At this, ODAC will connect to the first available server listed in ConnectString.

Post Reply