Global Data Services extends Oracle RAC-style service failover (within and across data centers) and management capabilities to replicated databases and achieves higher availability and improved manageability by enabling Global Data Services with Active Data Guard and Oracle GoldenGate.

If a database global service crash occurs, GDS, considering the service placement attributes, automatically performs an inter-database service failover to another available database in the pool. GDS sends Fast Application Notification (FAN) events so that the client connection pools can reconnect to the new database where the global service has been started.

The diagram shows SALES GDS Pool in two different deployments setups: Deployment 1 illustrates Active-Active database architecture using Oracle GoldenGate replication. Deployment 2 showcases Active-Passive database architecture utilizing Oracle Active Data Guard. 

Deployment 1 illustrates failure of Master database DB01 running RW workload -order_entry_srvc. Global Data Services fails over the RW workload to the available replica (DB02).

From a GSM node, use GDSCTL to configure GDS:

GDSCTL>add service -service order_entry_srvc -gdspool sales -preferred DB01 -available DB02

In Active-Active setup, RW (Read-Write) workload order_entry_srvc and RO (Read-Only) workload reporting_srvc can run on both replicas or be assigned to separate replicas. If a database fails, its workloads automatically transition to the surviving replica. Some customers configure Oracle GoldenGate replicas solely for failover, without executing workloads on them.

Deployment 2 illustrates failure of Standby database running RO workload reporting_srvc. Global Data Services fails over the RO workload to the Primary database.

GDSCTL> add service -service reporting_srvc -gdspool sales -preferred_all -role PHYSICAL_STANDBY -failover_primary

In Active-Passive setup, RW workloads are always processed on the primary database. If the primary fails, the standby takes over as the new primary, and RW workloads automatically transition to it. The standby database can optionally handle RO workloads under normal conditions. Upon primary failure, the standby assumes the primary role and serves both RW and RO workloads. 

TNS Entry in Client A and Client B tnsnames.ora:

order_entry_srvc =

(DESCRIPTION=(CONNECT_TIMEOUT=90)(RETRY_COUNT=30)(RETRY_DELAY=3)(TRANSPORT_CONNECT_TIMEOUT=3)

 (FAILOVER=ON)

  (ADDRESS_LIST=

    (LOAD_BALANCE=ON)         

    (ADDRESS=(PROTOCOL=TCP)(HOST=GSM-EAST)(PORT=1522))

    (ADDRESS=(PROTOCOL=TCP)(HOST= GSM-EAST2)(PORT= 1522))

    (ADDRESS=(PROTOCOL = TCP)(HOST=GSM-EAST3)(PORT=1522))

)

  (ADDRESS_LIST=

    (LOAD_BALANCE=ON)    

    (ADDRESS=(PROTOCOL=TCP)(HOST=GSM-WEST)(PORT=1522))

    (ADDRESS=(PROTOCOL=TCP)(HOST= GSM-WEST2)(PORT= 1522))

    (ADDRESS=(PROTOCOL = TCP)(HOST=GSM-WEST3)(PORT=1522))

 )

 (CONNECT_DATA=

   (SERVICE_NAME=order_entry_srvc.sales.oradbcloud) (REGION=EAST)

)

TNS Entry in Client C and Client D tnsnames.ora:

reporting_srvc =

(DESCRIPTION=(CONNECT_TIMEOUT=90)(RETRY_COUNT=30)(RETRY_DELAY=3)(TRANSPORT_CONNECT_TIMEOUT=3)

 (FAILOVER=ON)

  (ADDRESS_LIST=

    (LOAD_BALANCE=ON)         

    (ADDRESS=(PROTOCOL=TCP)(HOST=GSM-EAST)(PORT=1522))

    (ADDRESS=(PROTOCOL=TCP)(HOST= GSM-EAST2)(PORT= 1522))

    (ADDRESS=(PROTOCOL = TCP)(HOST=GSM-EAST3)(PORT=1522))

)

  (ADDRESS_LIST=

    (LOAD_BALANCE=ON)    

    (ADDRESS=(PROTOCOL=TCP)(HOST=GSM-WEST)(PORT=1522))

    (ADDRESS=(PROTOCOL=TCP)(HOST= GSM-WEST2)(PORT= 1522))

    (ADDRESS=(PROTOCOL = TCP)(HOST=GSM-WEST3)(PORT=1522))

 )

 (CONNECT_DATA=

   (SERVICE_NAME=reporting_srvc.sales.oradbcloud) (REGION=WEST)

)