When I configure my connections string to failover and then take down one oracle RAC Instance the OracleDB does not switch to the other RAC Instance that is alive. Instead I get the error "Error Message: ORA-01109: database not open"
Mostly I was testing with 2 host and one dead host. I indicated the dead host first. If I switch orders of hosts then oracleDB tries to connect to the first host and successfully connects.
Cut and paste text showing the command you ran. No screenshots.
This tells us whether you are using the python-oracledb Thin or Thick mode.
I tried both Thin and Thick mode. It had the same result.
Include a runnable Python script that shows the problem.
import oracledb
import environ
def start_pool():
# Generally a fixed-size pool is recommended, i.e. pool_min=pool_max. Here
# the pool contains 4 connections, which will allow 4 concurrent users.
pool_min = 4
pool_max = 4
pool_inc = 1
pool = oracledb.create_pool(
user=env('DATABASE_USER'),
password=env('DATABASE_PASSWORD'),
dsn=env('DATABASE_NAME'), # I added my connection string here
min=pool_min,
max=pool_max,
increment=pool_inc,
events=True,
)
What versions are you using?
2.1.2
Give your database version.
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
platform.platform: Linux-5.15.133.1-microsoft-standard-WSL2-x86_64-with-glibc2.31 sys.maxsize > 2**32: True platform.python_version: 3.10.13
oracledb.version: 2.1.2
Is it an error or a hang or a crash?
Its an error
What error(s) or behavior you are seeing?
When I configure my connections string to failover and then take down one oracle RAC Instance the OracleDB does not switch to the other RAC Instance that is alive. Instead I get the error "Error Message: ORA-01109: database not open"
Mostly I was testing with 2 host and one dead host. I indicated the dead host first. If I switch orders of hosts then oracleDB tries to connect to the first host and successfully connects.
Cut and paste text showing the command you ran. No screenshots.
Here is an example connection string
(DESCRIPTION=(TRANSPORT_CONNECT_TIMEOUT=5)(CONNECT_TIMEOUT=5)(RETRY_DELAY=10)(RETRY_COUNT=2)(FAILOVER=ON)(LOAD_BALANCE=off)(ADDRESS=(PROTOCOL=TCP)(HOST=OracleRACInstance1)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=OracleRACInstance1)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=DemoServiceName)))
Does your application call init_oracle_client()?
Yes
This tells us whether you are using the python-oracledb Thin or Thick mode.
I tried both Thin and Thick mode. It had the same result.
Include a runnable Python script that shows the problem.