| In this Document 
 APPLIES TO:Oracle Database - Enterprise Edition - Version 12.1.0.1 and laterOracle Database Cloud Schema Service - Version N/A and later
 Oracle Database Exadata Express Cloud Service - Version N/A and later
 Oracle Database Exadata Cloud Machine - Version N/A and later
 Oracle Cloud Infrastructure - Database Service - Version N/A and later
 Information in this document applies to any platform.
 GOALNOTE: In the images and/or the document content below, the user information and environment data used representsfictitious data from the Oracle sample schema(s),Public Documentation delivered with an Oracle database product or
 other training material. Any similarity to actual environments, actual persons, living or dead, is purely coincidental
 and not intended in any manner.
 For the purposes of this document, the following fictitious environment is used as an exampleto describe the procedure:
 NETWORK_NAME: SERVICE: prim.stpool.oradbcloudREGIONS: stregion
 DATABASE: STDB1, DB1
 SERVICE: prim.stpool.oradbcloud
 Goal of this article is to explain how we can create the TAF enabled Global Data Services in 12c environment and it will allow application continuity.  ++ Global Service PRIM is created as below: GDSCTL>add service -service prim -gdspool stpool -preferred_all -role PRIMARY -tafpolicy BASIC -failovertype SELECT -failovermethod BASIC -failoverretry 20 -failoverdelay 15GDSCTL>config service -service prim Catalog connection is established
 Name: prim
 Network name: prim.stpool.oradbcloud
 Pool: stpool
 Started: Yes
 Preferred all: Yes
 Locality: ANYWHERE
 Region Failover: No
 Role: PRIMARY
 Primary Failover: No
 Lag: ANY
 Runtime Balance: SERVICE_TIME
 Connection Balance: LONG
 Notification: Yes
 TAF Policy: BASIC
 Policy: AUTOMATIC
 DTP: No
 Failover Method: BASIC
 Failover Type: SELECT
 Failover Retries: 20
 Failover Delay: 15
 Edition:
 PDB:
 Commit Outcome:
 Retention Timeout:
 Replay Initiation Timeout:
 Session State Consistency: DYNAMIC
 SQL Translation Profile:
 Databases------------------------
 Database Preferred Status
 -------- --------- ------
 db1 Yes Enabled
 stdb1 Yes Enabled
   Client Side TNS enrty: PRIM =(DESCRIPTION=
 (FAILOVER=on)
 (ADDRESS_LIST=
 (LOAD_BALANCE=ON)
 (ADDRESS=(PROTOCOL = TCP)(host= localhost.localdomain)(port=1522)))
 (CONNECT_DATA=
 (SERVICE_NAME=prim.stpool.oradbcloud)
 (REGION=stregion)
 (FAILOVER_MODE=
 (TYPE=SELECT)
 (METHOD=basic)
 (RETRIES=20)
 (DELAY=15))
 )
 ))
  Test the Select during switchover: SQL> exitDisconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
 With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
 [oracle@localhost ~]$ sqlplus sys/<PASSWORD>@prim as sysdba
 SQL*Plus: Release 12.1.0.1.0 Production on Tue Jul 4 16:21:46 2017 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to:Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
 With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
 SQL>select * from dba_objects; At the same time issue switchover from the broker. DGMGRL> switchover to "DB1"Performing switchover NOW, please wait...
 New primary database "DB1" is opening...
 Operation requires startup of instance "stdb1" on database "STDB1"
 Starting instance "stdb1"...
 ORACLE instance started.
 Database mounted.
 Database opened.
 Switchover succeeded, new primary is "DB1"
 DGMGRL> switchover to "STDB1"
 Performing switchover NOW, please wait...
 Operation requires a connection to instance "stdb1" on database "STDB1"
 Connecting to instance "stdb1"...
 Connected as SYSDBA.
 New primary database "STDB1" is opening...
 Operation requires startup of instance "db1" on database "DB1"
 Starting instance "db1"...
 ORACLE instance started.
 Database mounted.
 Database opened.
 Switchover succeeded, new primary is "STDB1"
 Result of select: SHARING E O------------- - -
 NONE Y
 OWNER--------------------------------------------------------------------------------
 OBJECT_NAME
 --------------------------------------------------------------------------------
 SUBOBJECT_NAME
 --------------------------------------------------------------------------------
 OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_
 ---------- -------------- ----------------------- --------- ---------
 TIMESTAMP STATUS T G S NAMESPACE
 ------------------- ------- - - - ----------
 EDITION_NAME
 --------------------------------------------------------------------------------
 SHARING E O
 ------------- - -
 >>>>>>>>>select paused during switchover and then continued instead of throwing ORA-03113 error.
 OWNER--------------------------------------------------------------------------------
 OBJECT_NAME
 --------------------------------------------------------------------------------
 SUBOBJECT_NAME
 --------------------------------------------------------------------------------
 OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_
 ---------- -------------- ----------------------- --------- ---------
 TIMESTAMP STATUS T G S NAMESPACE
 ------------------- ------- - - - ----------
 EDITION_NAME
 --------------------------------------------------------------------------------
 SHARING E O
 ------------- - -
 NONE N
 OWNER--------------------------------------------------------------------------------
 OBJECT_NAME
 --------------------------------------------------------------------------------
 SUBOBJECT_NAME
 --------------------------------------------------------------------------------
 OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE CREATED LAST_DDL_
 ---------- -------------- ----------------------- --------- ---------
 TIMESTAMP STATUS T G S NAMESPACE
 ------------------- ------- - - - ----------
 EDITION_NAME
 --------------------------------------------------------------------------------
 SHARING E O
 ------------- - -
 90801 rows selected. |