christian ngom
christian ngom

Reputation: 1

can you help me to realize client failover on oracle 12c?

I have 02 oracles and oracles vcpu servers on which are created respectively a primary BD (db_name = chicago and db_unique_name = chicago) and a standby BD (db_name = chicago and db_unique_name = boston). I created a service in the 02 servers with the utility srvctl:

srvctl add service -d "db_unique_name" -s CHICAGO_HA -l PRIMARY -q TRUE -e SELECT -m BASIC -z 150 -w 10

Then I added an entry in my tnsnames.ora file:

CHICAGO_HA =
  (DESCRIPTION_LIST =
    (LOAD_BALANCE = off)
    (FAILOVER = on)
    (DESCRIPTION =
        (CONNECT_TIMEOUT = 10) (RETRY_COUNT = 3)
        (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.17.140) (PORT = 1522)))
        (CONNECT_DATA = (SERVICE_NAME = chicago_ha))
    )
    (DESCRIPTION =
        (CONNECT_TIMEOUT = 10) (RETRY_COUNT = 3)
        (ADDRESS_LIST = (ADDRESS = (PROTOCOL = tcp) (HOST = 192.168.17.138) (PORT = 1522)))
        (CONNECT_DATA = (SERVICE_NAME = chicago_ha))
    )
 )

I have a client on which i have opened a session :

sqlplus sys/*****@chicago_ha as sysdba 

on primary host. i can query tables. but after switchover when i can't query tables because my session ends with errors like I am no longer connected.

Upvotes: 0

Views: 228

Answers (1)

Christopher Jones
Christopher Jones

Reputation: 10691

If I read it correctly, your setup has connect-time failover, but you are trying to use an already open connection to the now-closed instance? You would need something like Application Continuity or Transparent Application Continuity for an existing connection to be moved to the other instance. Check the Oracle white paper Continuous Availability Application Continuity for the Oracle Database.

SQL*Plus generally isn't a great testing tool to mimic real-life apps that have connection pools and lots of users.

Upvotes: 1

Related Questions