Forum Stats

  • 3,839,996 Users
  • 2,262,557 Discussions
  • 7,901,120 Comments

Discussions

Can we use FAN (with JDBC) with DataGuard setup

Server - hostA (Primary database)

Server - hostB (Standby database)


Database Version : 12.2.0.1

OS version : Solaris 5.11

Database has active DataGuard setup

RAC - NO

ASM - NO (we are using ZFS)

Grid infrastructure - NO

DataGuard Broker - Yes, (Fast-Start Failover: DISABLED)

Dynamic registration of service to Listener - YES via service_names and local_listener parameter

Connection string used at tomcat JDBC : jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(HOST=hostB)(PROTOCOL=TCP)(PORT=12345))(ADDRESS=(HOST=hostA)(PROTOCOL=TCP)(PORT=12345))(FAILOVER=YES)(CONNECT_DATA=(SERVICE_NAME=DB_PRIM)))

Here the JDBC always connects to wrong server hostB first (on which the service DB_PRIM is not running), then it failover to hostA (that is where DB_PRIM service is registered with listener)


Question : Is there any way we can have setup like FAN like service with above database configuration. if so then what changes are required?. basically we want JDBC to knows the correct host always where the service is registered.