SlideShare a Scribd company logo
BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA
HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH
Oracle Active Data Guard and
Global Data Services in Action!
Robert Bialek
Principal Consultant
Partner
Trivadis SA
Ludovico Caldara
Oracle ACE
Senior Consultant
Trivadis SA
About Ludovico Caldara
Global Data Services in Action!2 08/12/2015
■ 16 Years DBA (Not Only Oracle)
▪ I do it everywhere (even Windows)
■ RAC ATTACK Ninja & co-writer
■ VP, SOUG & ITOUG Board member
■ OCP (11g, 12c, MySQL) & OCE
■ Italian living in Switzerland
■ http://www.ludovicocaldara.net
■ @ludodba
■ ludovicocaldara
Opinions are my own
Our company.
Global Data Services in Action!3 08/12/2015
Trivadis is a market leader in IT consulting, system integration, solution engineering
and the provision of IT services focusing on and
technologies in Switzerland, Germany, Austria and Denmark.
We offer our services in the following strategic business fields:
Trivadis Services takes over the interactive operation of your IT systems.
O P E R A T I O N
COPENHAGEN
MUNICH
LAUSANNE
BERN
ZURICH
BRUGG
GENEVA
HAMBURG
DÜSSELDORF
FRANKFURT
STUTTGART
FREIBURG
BASEL
VIENNA
With over 600 specialists and IT experts in your region.
Global Data Services in Action!4 08/12/2015
14 Trivadis branches and more than
600 employees
200 Service Level Agreements
Over 4,000 training participants
Research and development budget:
CHF 5.0 / EUR 4 million
Financially self-supporting and
sustainably profitable
Experience from more than 1,900
projects per year at over 800
customers
Global Data Services in Action!5 08/12/2015
Local Data Services
(or how it used to be)
Local Data Services (Clusterware)
Global Data Services in Action!6 08/12/2015
RAC DB
INST1 INST2
Single Client Access Name
SERVICE_A
$ srvctl add service 
-database db_unique_name 
-service service_a 
-role "[PRIMARY][,PHYSICAL_STANDBY]" 
-cblgoal { SHORT | LONG } 
-failovertype {NONE|SESSION|SELECT|TRANSACTION} 
-failovermethod {NONE | BASIC} 
-preferred preferred_list 
-available available_list
Local Data Services (Active Data Guard, no Clustware)
Global Data Services in Action!7 08/12/2015
PRIMARY STANDBY
SERVICE_A_RO
CREATE OR REPLACE TRIGGER service_a_ro
after startup on database
DECLARE
role VARCHAR(30);
BEGIN
SELECT DATABASE_ROLE INTO role FROM V$DATABASE;
IF role = 'PRIMARY' THEN
DBMS_SERVICE.START_SERVICE(service_a');
ELSE
DBMS_SERVICE.START_SERVICE(service_a_ro');
END IF;
END;
/DB_SITE1 DB_SITE2
SERVICE_A_RW
Local Data Services (MAA, Active Data Guard, etc.)
Global Data Services in Action!8 08/12/2015
Create services for Primary role on ALL the databases
Create services for Standby role on ALL the databases
Define connection descriptors with static address list
Local Data Services (MAA)
Global Data Services in Action!9 08/12/2015
SERVICE_A= (DESCRIPTION_LIST=
(LOAD_BALANCE=off) (FAILOVER=on)
(DESCRIPTION = (CONNECT_TIMEOUT=5)
(TRANSPORT_CONNECT_TIMEOUT=3) (RETRY_COUNT=3)
(ADDRESS_LIST= (LOAD_BALANCE=on)
(ADDRESS = (PROTOCOL = TCP)(HOST = raca-scan)(PORT = 1521)))
(CONNECT_DATA = (SERVICE_NAME = SERVICE_A)) )
(DESCRIPTION = (CONNECT_TIMEOUT=5)
(TRANSPORT_CONNECT_TIMEOUT=3) (RETRY_COUNT=3)
(ADDRESS_LIST= (LOAD_BALANCE=on)
(ADDRESS = (PROTOCOL = TCP)(HOST = racb-scan)(PORT = 1521)))
(CONNECT_DATA = (SERVICE_NAME = SERVICE_A)) ) )
Local Data Services: not for complex environments
Global Data Services in Action!10 08/12/2015
PRIMARY STANDBY STANDBY
STANDBY
SYNC
ASYNC
ASYNC
Local Data Services: not for complex environments
Global Data Services in Action!11 08/12/2015
PRIMARY STANDBY STANDBY
STANDBY
SYNC
ASYNC
ASYNC
SWISS
CLIENTS
READ
HERE
GERMAN
CLIENTS
READ
HERE
Local Data Services: not for complex environments
Global Data Services in Action!12 08/12/2015
PRIMARY STANDBY STANDBY
STANDBY
SYNC
ASYNC
ASYNC
IN CASE OF
LAG BOTH
READ HERE
Local Data Services: not for complex environments
Global Data Services in Action!13 08/12/2015
PRIMARY STANDBY STANDBY
STANDBY
SYNC
ASYNC
ASYNC
IN CASE OF
PROBLEMS ALL
READ FROM
PRIMARY
Global Data Services are the new big improvement
Global Data Services in Action!14 08/12/2015
PRIMARY STANDBY STANDBY
STANDBY
SYNC
ASYNC
ASYNC
GLOBAL DATA SERVICES INFRASTRUCTURE
Global Data Services in Action!15 08/12/2015
Global Data Services
Overview
Global Data Services - Overview
Global Data Services in Action!16 08/12/2015
Introduced in 12.1.0.1
Goal: centralize database service management
– In replicated environments
– For applications which are replication-aware
Extra-cost option: requires Oracle Active Data Guard or Oracle Golden Gate
SALES SALES SALES
GLOBAL DATA SERVICES INFRASTRUCTURE
SERVICE
Global Data Services – Big Picture
Global Data Services in Action!17 08/12/2015
SALES SALESSALES SALES SALESSALES
Golden Gate, Active Data Guard, Streams, […]
Global Data Services – Big Picture
Global Data Services in Action!18 08/12/2015
Global Service
Manager 1
Global Service
Manager 2
Global Service
Manager 3
Global Service
Manager 4
SALES SALESSALES SALES SALESSALES
Golden Gate, Active Data Guard, Streams, […]
GDS POOL: SALES (sales_rw, sales_ro, sales_rep, …)
GDS
CATALOG
GDS
CATALOG
Global Data Services – Big Picture
Global Data Services in Action!19 08/12/2015
Global Service
Manager 1
Global Service
Manager 2
Global Service
Manager 3
Global Service
Manager 4
SALES SALESSALES SALES SALESSALES
Golden Gate, Active Data Guard, Streams, […]
GDS POOL: SALES (sales_rw, sales_ro, sales_rep, …)
GDS
CATALOG
GDS
CATALOG
Global Services
GDS Pool
Databases
GDS Pool
Databases
Global Data Services – How it works?
Global Data Services in Action!20 08/12/2015
SALES SALES SALESSALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
1
Request a connection for a global service to a GSM
Service naming: <gs_name>.<gds_pool>.<gds_configuration>
1
Global Data Services – How it works?
Global Data Services in Action!21 08/12/2015
SALES SALES SALESSALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
1 2
Request a connection for a global service to a GSM
Service naming: <gs_name>.<gds_pool>.<gds_configuration>
GSM returns the local listener address (SCAN is bypassed)
1
2
Global Data Services – How it works?
Global Data Services in Action!22 08/12/2015
SALES SALES SALESSALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
1 2
3
Request a connection for a global service to a GSM
Service naming: <gs_name>.<gds_pool>.<gds_configuration>
GSM returns the local listener address (SCAN is bypassed)
Connect to the Global Service active locally on the target
1
2
3
Global Data Services in Action!23 08/12/2015
Global Data Services
Setup
Global Data Services - Setup
Global Data Services in Action!24 08/12/2015
GDS – Catalog/Regions/Pools
Global Data Services in Action!25 08/12/2015
Create the GDS catalog administrator account in a 12c database
– For CDBs it must be a common user (or ORA-45562 raised)
Internally, the GDS catalog data is stored in the schema GSMADMIN_INTERNAL
(tables, PL/SQL code, jobs, types,…)
SQL> CREATE USER c##gsm_admin IDENTFIED BY <password>;
SQL> GRANT gsmadmin_role TO c##gsm_admin;
GDSCTL> CREATE CATALOG
-database gsm01.trivadis.com:1521/repo_site1.trivadis.com
-user c##gsm_admin/<password>
-region germany,switzerland #default region: regionora
-gdspool sales,order_entry #default pool: dbpoolORA
-configname tvddbcloud #default name: oradbcloud
-autovncr on
GDS POOL
GDS Region12c
Global Service Manager
Global Data Services in Action!26 08/12/2015
To connect to the catalog database, GSM uses the GSMCATUSER database account
Each GSM needs to be registered in the GDS configuration
GSM needs to be started and integrated in the cluster/OS startup procedures
SQL> ALTER USER GSMCATUSER ACCOUNT UNLOCK;
SQL> ALTER USER GSMCATUSER IDENTFIED BY <password>;
GDSCTL> ADD GSM -gsm gsm1 -listener 1530
-catalog gds01.trivadis.com:1521/repo_site1.trivadis.com
-region germany
-wpwd <password>
"gsmcatuser" password:
Create credential oracle.security.client.connect_string1
GSM successfully added
GDSCTL> START GSM –gsm gsm1
Wallet stored in
$TNS_ADMIN/gsmwallet
GSM
GDS Pool Databases
Global Data Services in Action!27 08/12/2015
For each target GDS pool database, unlock the GSMUSER user
A pool database must be added to the correct GDS region
One GDS pool can host many pool databases
A database can belong only to one GDS pool
GDSCTL> ADD DATABASE -connect GDSDB2_SITE1.TRIVADIS.COM
-region germany -gdspool order_entry
"gsmuser" password:
DB Unique Name: GDSDB2_SITE1
SQL> ALTER USER GSMUSER ACCOUNT UNLOCK;
SQL> ALTER USER GSMUSER IDENTFIED BY <password>;
GDS Pool DBs (Data Guard broker)
Global Data Services in Action!28 08/12/2015
PRIMARY STANDBY STANDBY
Data Guard config can be added only to an empty GDS pool (or ORA-44881)
For each standby database, the region need to be manually specified
GDSCTL> ADD BROKERCONFIG
-connect db01.trivadis.com:1521/DB1_SITE1.TRIVADIS.COM
-pwd <password> -gdspool sales -region germany
Catalog connection is established
DB Unique Name: GDSDB1_SITE1
GDSCTL> CONFIG DATABASE
Name Pool Status Region
---- ---- ------ ------
gdsdb1_site2 sales Ok
gdsdb1_site3 sales Ok
gdsdb1_site1 sales Ok germany
GDSCTL> MODIFY DATABASE -database gdsdb1_site2 -region germany
Empty GDS
Region
Global Data Services in Action!29 08/12/2015
I don’t mind the setup,
Show me the services!
Global Database Services - Features
Global Data Services in Action!30 08/12/2015
Global Data Services support
– Local Service Attributes (TAF, rlbgoal, clbgoal, commit outcome…)
– Preferred and available databases
– Replication lag threshold (ADG only)
– Region affinity
GDS - Restrictions
Global Data Services in Action!31 08/12/2015
Creation of a global service for a target pool database registered in Oracle Restart fails
(during registration of a CRS global service resource)
For Grid Infrastructure with role separation
– Local Listener must run from oracle user, RDBMS_HOME
For RAC,the service registration works correctly only with policy-managed database
– With administrator-managed RAC databases, the registration does not work
(ORA-45540/PRCR-1001) – BUG assigned to development
CRS-2509: Resource type 'ora.cluster_vip_net1.type' used in
dependency 'hard' does not exist or is not registered
srvctl modify listener -user oracle -oraclehome $RDBMS_HOME
Global Connection: Client-side
Global Data Services in Action!32 08/12/2015
GSALES_RO.TRIVADIS.COM =
(DESCRIPTION=
(CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(TRANSPORT_CONNECT_TIMEOUT=3)(FAILOVER=ON)
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm01.trivadis.com)(PORT=1530))
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm02.trivadis.com)(PORT=1530)))
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm03.trivadis.com)(PORT=1530)))
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm04.trivadis.com)(PORT=1530)))
(CONNECT_DATA=
(SERVICE_NAME=gsales_ro.sales.tvddbcloud)
(REGION=germany)))
Global Connection: Client-side
Global Data Services in Action!33 08/12/2015
GSALES_RO.TRIVADIS.COM =
(DESCRIPTION=
(CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(TRANSPORT_CONNECT_TIMEOUT=3)(FAILOVER=ON)
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm01.trivadis.com)(PORT=1530))
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm02.trivadis.com)(PORT=1530)))
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm03.trivadis.com)(PORT=1530)))
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm04.trivadis.com)(PORT=1530)))
(CONNECT_DATA=
(SERVICE_NAME=gsales_ro.sales.tvddbcloud)
(REGION=germany)))
GSMs Region Switzerland
GSMs Region Germany
Global Connection: Client-side
Global Data Services in Action!34 08/12/2015
GSALES_RO.TRIVADIS.COM =
(DESCRIPTION=
(CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(TRANSPORT_CONNECT_TIMEOUT=3)(FAILOVER=ON)
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm01.trivadis.com)(PORT=1530))
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm02.trivadis.com)(PORT=1530)))
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm03.trivadis.com)(PORT=1530)))
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm04.trivadis.com)(PORT=1530)))
(CONNECT_DATA=
(SERVICE_NAME=gsales_ro.sales.tvddbcloud)
(REGION=germany)))
Intra-Region Failover
Intra-Region Failover
Global Connection: Client-side
Global Data Services in Action!35 08/12/2015
GSALES_RO.TRIVADIS.COM =
(DESCRIPTION=
(CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(TRANSPORT_CONNECT_TIMEOUT=3)(FAILOVER=ON)
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm01.trivadis.com)(PORT=1530))
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm02.trivadis.com)(PORT=1530)))
(ADDRESS_LIST=
(LOAD_BALANCE=ON)
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm03.trivadis.com)(PORT=1530)))
(ADDRESS=(PROTOCOL = TCP)(HOST=gsm04.trivadis.com)(PORT=1530)))
(CONNECT_DATA=
(SERVICE_NAME=gsales_ro.sales.tvddbcloud)
(REGION=germany)))
Inter-Region Failover
Global Connection Load Balancing
Global Data Services in Action!36 08/12/2015
Client connection requests are routed to the least-loaded database (like SCAN)
– Based on performance, interregion network latency, region affinity and CLB/RLB goal
GDSCTL> SERVICES -service gsales_ro –support
Service "gsales_ro.sales.tvddbcloud" has 3 instance(s). Affinity: LOCALONLY
Instance "sales%31", name: "GDSDB2", db: "GDSDB2_SITE1",
region: "germany", status: ready.
Request ratio: 35.57%, Sessions: 0, Elapsed time: 115.84 ms.
Region "germany": RLB Ratio: 2.99%, Response Time: 115.84 ms,
Network Factor: 0 UCPS: 0.70 FLAGS: 0 CPU 100.00
Instance "sales%41", name: "GDSDB2", db: "GDSDB2_SITE2",
region: "germany", status: ready.
Request ratio: 64.43%, Sessions: 0, Elapsed time: 1.28 ms.
Region "germany": RLB Ratio: 97.01%, Response Time: 1.28 ms,
Network Factor: 0 UCPS: 1.27 FLAGS: 0 CPU 1.00
GDSCTL> ADD SERVICE -gdspool sales -service gsales_ro
–clbgoal [SHORT|LONG] –rlbgoal [SERVICE_TIME | THROUGHPUT]
Global Connection Region Affinity - Anywhere
Global Data Services in Action!37 08/12/2015
GDSCTL> ADD SERVICE -gdspool sales
-service sales_rpt -locality ANYWHERE
SALES SALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
SALES SALES
Global Connection Region Affinity - Anywhere
Global Data Services in Action!38 08/12/2015
GDSCTL> ADD SERVICE -gdspool sales
-service sales_rpt -locality ANYWHERE
SALES SALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
1
SALES SALES
1
REMOTE
LOCAL
Global Connection Region Affinity – Local Only
Global Data Services in Action!39 08/12/2015
GDSCTL> ADD SERVICE -gdspool sales
-service sales_rpt -locality LOCAL_ONLY
SALES SALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
SALES SALES
Global Connection Region Affinity – Local Only
Global Data Services in Action!40 08/12/2015
GDSCTL> ADD SERVICE -gdspool sales
-service sales_rpt -locality LOCAL_ONLY
SALES SALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
1
SALES SALES
LOCAL
Global Connection Region Affinity – Local Only
Global Data Services in Action!41 08/12/2015
GDSCTL> ADD SERVICE -gdspool sales
-service sales_rpt -locality LOCAL_ONLY
SALES SALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
1
2
SALES SALES
LOCAL
CRASH
Global Connection Region Affinity – Local Only
Global Data Services in Action!42 08/12/2015
GDSCTL> ADD SERVICE -gdspool sales
-service sales_rpt -locality LOCAL_ONLY
SALES SALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
1
2
3
SALES SALES
LOCAL
CRASH
TNS-12514
Global Connection Region Affinity – Region Failover
Global Data Services in Action!43 08/12/2015
GDSCTL> ADD SERVICE -gdspool sales
-service sales_rpt -locality LOCAL_ONLY –region_failover
SALES SALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
SALES SALESSALES SALES
Global Connection Region Affinity – Region Failover
Global Data Services in Action!44 08/12/2015
GDSCTL> ADD SERVICE -gdspool sales
-service sales_rpt -locality LOCAL_ONLY –region_failover
SALES SALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
SALES SALESSALES SALES
1
LOCAL
Global Connection Region Affinity – Region Failover
Global Data Services in Action!45 08/12/2015
GDSCTL> ADD SERVICE -gdspool sales
-service sales_rpt -locality LOCAL_ONLY –region_failover
SALES SALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
SALES SALESSALES SALES
1
2
LOCAL
CRASH
Global Connection Region Affinity – Region Failover
Global Data Services in Action!46 08/12/2015
GDSCTL> ADD SERVICE -gdspool sales
-service sales_rpt -locality LOCAL_ONLY –region_failover
SALES SALES
Golden Gate, Active Data Guard, Streams, […]
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
DATABASE CLIENTS
SALES SALESSALES SALES
1
2
3
LOCAL
CRASH
REMOTE
Region Affinity: CDB & PDBs
Global Data Services in Action!47 08/12/2015
In version 12.1.0.2, Region Affinity for a PDB is ignored
Current workaround: create a global service for the CDB$ROOT container, drop it
and create again with the same name for the target PDB
GDSCTL> CONFIG SERVICE -gdspool sales -service gsales_ro
Name: gsales_ro
Network name: gsales_ro.sales.tvddbcloud
Locality: LOCAL_ONLY
Region Failover: No
PDB: app1
GDSCTL> SERVICES -service gsales_ro
Service "gsales_ro.sales.tvddbcloud" has 2 instance(s). Affinity:
ANYWHERE Instance "sales%11", name: "GDSDB1", db: "GDSDB1_SITE2",
region: "germany", status: ready.
Instance "sales%21", name: "GDSDB1", db: "GDSDB1_SITE3",
region: "switzerland", status: ready.
Global Service Placement/Failover
Global Data Services in Action!48 08/12/2015
For each Global Service a placement attribute can be specified
GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service>
[ -preferred_all |
-preferred db1,db2,db3 -available db4 ]
DB1 DB2 DB3 DB4
1
Global Service Placement/Failover
Global Data Services in Action!49 08/12/2015
For each Global Service a placement attribute can be specified
GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service>
[ -preferred_all |
-preferred db1,db2,db3 -available db4 ]
DB1 DB2 DB3 DB4
1
2
Global Service Placement/Failover
Global Data Services in Action!50 08/12/2015
For each Global Service a placement attribute can be specified
GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service>
[ -preferred_all |
-preferred db1,db2,db3 -available db4 ]
DB1 DB2 DB3 DB4
1
2
3
Global Service Placement/Failover
Global Data Services in Action!51 08/12/2015
For each Global Service a placement attribute can be specified
GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service>
[ -preferred_all |
-preferred db1,db2,db3 -available db4 ]
DB1 DB2
GDSCTL> relocate service … -old_db db4 -new_db db2
DB3 DB4
1
2
3
Role-Based Global Services – Lag Tolerance
Global Data Services in Action!52 08/12/2015
Role-based services are supported for pool databases in Data Guard Broker configuration
GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service>
[ -role PRIMARY |
-role PHYSICAL_STANDBY -failover_primary –lag 20
DB1 DB2
PRIMARY
DB3
1 STANDBY STANDBY
Role-Based Global Services – Lag Tolerance
Global Data Services in Action!53 08/12/2015
Role-based services are supported for pool databases in Data Guard Broker configuration
GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service>
[ -role PRIMARY |
-role PHYSICAL_STANDBY -failover_primary –lag 20
DB1 DB2
PRIMARY
DB3
1
2
STANDBY STANDBY
STANDBYPRIMARYSTANDBY
Role-Based Global Services – Lag Tolerance
Global Data Services in Action!54 08/12/2015
Role-based services are supported for pool databases in Data Guard Broker configuration
GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service>
[ -role PRIMARY |
-role PHYSICAL_STANDBY -failover_primary –lag 20
DB1 DB2
PRIMARY
DB3
1
2
STANDBY STANDBY
STANDBYPRIMARYSTANDBY
3 STANDBYPRIMARYSTANDBY
LAG>20
Role-Based Global Services – Lag Tolerance
Global Data Services in Action!55 08/12/2015
Role-based services are supported for pool databases in Data Guard Broker configuration
GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service>
[ -role PRIMARY |
-role PHYSICAL_STANDBY -failover_primary –lag 20
DB1 DB2
PRIMARY
DB3
1
2
STANDBY STANDBY
STANDBYPRIMARYSTANDBY
3
4
STANDBY
STANDBY
PRIMARYSTANDBY
LAG>20
Role-Based Global Services – Lag Tolerance
Global Data Services in Action!56 08/12/2015
Role-based services are supported for pool databases in Data Guard Broker configuration
GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service>
[ -role PRIMARY |
-role PHYSICAL_STANDBY -failover_primary –lag 20
DB1 DB2
PRIMARY
DB3
1
2
STANDBY STANDBY
STANDBYPRIMARYSTANDBY
3
4
STANDBY
STANDBY
PRIMARYSTANDBY
LAG>20
PRIMARYSTANDBY STANDBY
LAG<=20
5
Global Data Services in Action!57 08/12/2015
DEMO?
GSM03 GSM04
GDS Region: SWITZERLAND
GSM01 GSM02
GDS Region: GERMANY
OLTP OLTPGSMCAT OLTP
Global Services: gsales_rw, gsales_ro
Pool: Sales
Conclusions
Global Data Services in Action!58 08/12/2015
Central Database Service Management
Works as expected, minor bugs
Perfect for complex environments
Extra-cost option (GG or ADG)
What's your question?
08/12/2015 Global Data Services in Action!59
Robert Bialek
Principal Consultant
Partner
Trivadis SA
Ludovico Caldara
Oracle ACE
Senior Consultant
Trivadis SA

More Related Content

What's hot (20)

PDF
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
PDF
Oracle RAC on Extended Distance Clusters - Customer Examples
Markus Michalewicz
 
PPTX
Processing Large Data with Apache Spark -- HasGeek
Venkata Naga Ravi
 
PDF
Streaming Data Lakes using Kafka Connect + Apache Hudi | Vinoth Chandar, Apac...
HostedbyConfluent
 
PDF
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Noritaka Sekiyama
 
PDF
Oracle RAC 19c and Later - Best Practices #OOWLON
Markus Michalewicz
 
PDF
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
Ludovico Caldara
 
PDF
Parquet Hadoop Summit 2013
Julien Le Dem
 
PPTX
SF Big Analytics 20190612: Building highly efficient data lakes using Apache ...
Chester Chen
 
PPTX
Azure Synapse Analytics Overview (r2)
James Serra
 
PPTX
Spark Shuffle Deep Dive (Explained In Depth) - How Shuffle Works in Spark
Bo Yang
 
PDF
MAA Best Practices for Oracle Database 19c
Markus Michalewicz
 
PPT
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
John Kanagaraj
 
PDF
Understanding oracle rac internals part 1 - slides
Mohamed Farouk
 
PDF
Oracle Clusterware Node Management and Voting Disks
Markus Michalewicz
 
PDF
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
Tanel Poder
 
PDF
Hudi architecture, fundamentals and capabilities
Nishith Agarwal
 
PDF
Iceberg: A modern table format for big data (Strata NY 2018)
Ryan Blue
 
PDF
Continuous Data Replication into Cloud Storage with Oracle GoldenGate
Michael Rainey
 
PDF
The Oracle RAC Family of Solutions - Presentation
Markus Michalewicz
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
SrirakshaSrinivasan2
 
Oracle RAC on Extended Distance Clusters - Customer Examples
Markus Michalewicz
 
Processing Large Data with Apache Spark -- HasGeek
Venkata Naga Ravi
 
Streaming Data Lakes using Kafka Connect + Apache Hudi | Vinoth Chandar, Apac...
HostedbyConfluent
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Noritaka Sekiyama
 
Oracle RAC 19c and Later - Best Practices #OOWLON
Markus Michalewicz
 
ORACLE 12C DATA GUARD: FAR SYNC, REAL-TIME CASCADE STANDBY AND OTHER GOODIES
Ludovico Caldara
 
Parquet Hadoop Summit 2013
Julien Le Dem
 
SF Big Analytics 20190612: Building highly efficient data lakes using Apache ...
Chester Chen
 
Azure Synapse Analytics Overview (r2)
James Serra
 
Spark Shuffle Deep Dive (Explained In Depth) - How Shuffle Works in Spark
Bo Yang
 
MAA Best Practices for Oracle Database 19c
Markus Michalewicz
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
John Kanagaraj
 
Understanding oracle rac internals part 1 - slides
Mohamed Farouk
 
Oracle Clusterware Node Management and Voting Disks
Markus Michalewicz
 
Troubleshooting Complex Oracle Performance Problems with Tanel Poder
Tanel Poder
 
Hudi architecture, fundamentals and capabilities
Nishith Agarwal
 
Iceberg: A modern table format for big data (Strata NY 2018)
Ryan Blue
 
Continuous Data Replication into Cloud Storage with Oracle GoldenGate
Michael Rainey
 
The Oracle RAC Family of Solutions - Presentation
Markus Michalewicz
 

Viewers also liked (13)

PDF
Rapid Home Provisioning
Ludovico Caldara
 
PDF
Oracle Database on ACFS: a perfect marriage?
Ludovico Caldara
 
PDF
Oracle RAC 12c and Policy-Managed Databases, a Technical Overview
Ludovico Caldara
 
PDF
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Ludovico Caldara
 
PDF
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Ludovico Caldara
 
PDF
Boost your Oracle RAC manageability with Policy-Managed Databases
Ludovico Caldara
 
PDF
Evolve your toolchains dev/ops with OpenStack
Ryan Richard
 
PDF
Galera Cluster: Synchronous Multi-Master Replication for MySQL HA
Ludovico Caldara
 
PDF
RACAttack 12c Advanced Lab: Server Pools and Policy-managed databases
Ludovico Caldara
 
PPT
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Toronto-Oracle-Users-Group
 
PPTX
Oracle E-Business Suite R12.2.6 on Database 12c: Install, Patch and Administer
Andrejs Karpovs
 
PPTX
Oracle SQL Developer Tips & Tricks
Jeff Smith
 
PDF
Oracle 12.2 sharded database management
Leyi (Kamus) Zhang
 
Rapid Home Provisioning
Ludovico Caldara
 
Oracle Database on ACFS: a perfect marriage?
Ludovico Caldara
 
Oracle RAC 12c and Policy-Managed Databases, a Technical Overview
Ludovico Caldara
 
Oracle RAC, Data Guard, and Pluggable Databases: When MAA Meets Multitenant (...
Ludovico Caldara
 
Oracle Active Data Guard 12c: Far Sync Instance, Real-Time Cascade and Other ...
Ludovico Caldara
 
Boost your Oracle RAC manageability with Policy-Managed Databases
Ludovico Caldara
 
Evolve your toolchains dev/ops with OpenStack
Ryan Richard
 
Galera Cluster: Synchronous Multi-Master Replication for MySQL HA
Ludovico Caldara
 
RACAttack 12c Advanced Lab: Server Pools and Policy-managed databases
Ludovico Caldara
 
Extreme Availability using Oracle 12c Features: Your very last system shutdown?
Toronto-Oracle-Users-Group
 
Oracle E-Business Suite R12.2.6 on Database 12c: Install, Patch and Administer
Andrejs Karpovs
 
Oracle SQL Developer Tips & Tricks
Jeff Smith
 
Oracle 12.2 sharded database management
Leyi (Kamus) Zhang
 
Ad

Similar to Oracle Active Data Guard and Global Data Services in Action! (20)

PDF
Oracle-Global-Data-Services-Overview-2023.pdf
thanarocky
 
PPTX
Intelligent_Workload_Management
Ritika Nevatia
 
PPTX
Oracle database 12c new features
Jakkrapat S.
 
PDF
101 Pdfsam
Emanuel Mateus
 
PPTX
Service Mapping
Mohamed El-Qassas
 
PDF
Oracle 11g R2 Live Part 2
Oracle Corporation
 
PPTX
Roles y Responsabilidades en SQL Azure
Eduardo Castro
 
PPTX
Sql server master data services
Kiki Noviandi
 
PDF
21 Pdfsam
Emanuel Mateus
 
PDF
21 Rac
Emanuel Mateus
 
DOC
Oracle10g rac course_contents
amolmh
 
PDF
Oracle 12.2 Domain Services Cluster
Markus Flechtner
 
PPTX
Microsoft TechEd India 2012 Backup Restore
Amit Banerjee
 
PDF
GDS Corporate Presentation
Anand Kumar Kuchipudi
 
PPTX
Master Data Services - 2016 - Huntington Beach
Jeff Prom
 
PPT
“Lights Out”Configuration using Tivoli Netcool AutoDiscovery Tools
Antonio Rolle
 
PDF
A Cloud Journey - Move to the Oracle Cloud
Markus Michalewicz
 
PDF
orical
Gowri Shankar
 
PPTX
Get the most out of Oracle Data Guard - POUG version
Ludovico Caldara
 
PDF
Oracle RAC Online Training.pdf
SpiritsoftsTraining
 
Oracle-Global-Data-Services-Overview-2023.pdf
thanarocky
 
Intelligent_Workload_Management
Ritika Nevatia
 
Oracle database 12c new features
Jakkrapat S.
 
101 Pdfsam
Emanuel Mateus
 
Service Mapping
Mohamed El-Qassas
 
Oracle 11g R2 Live Part 2
Oracle Corporation
 
Roles y Responsabilidades en SQL Azure
Eduardo Castro
 
Sql server master data services
Kiki Noviandi
 
21 Pdfsam
Emanuel Mateus
 
Oracle10g rac course_contents
amolmh
 
Oracle 12.2 Domain Services Cluster
Markus Flechtner
 
Microsoft TechEd India 2012 Backup Restore
Amit Banerjee
 
GDS Corporate Presentation
Anand Kumar Kuchipudi
 
Master Data Services - 2016 - Huntington Beach
Jeff Prom
 
“Lights Out”Configuration using Tivoli Netcool AutoDiscovery Tools
Antonio Rolle
 
A Cloud Journey - Move to the Oracle Cloud
Markus Michalewicz
 
Get the most out of Oracle Data Guard - POUG version
Ludovico Caldara
 
Oracle RAC Online Training.pdf
SpiritsoftsTraining
 
Ad

More from Ludovico Caldara (16)

PDF
Oracle Fleet Patching and Provisioning Deep Dive Webcast Slides
Ludovico Caldara
 
PDF
Oracle Drivers configuration for High Availability, is it a developer's job?
Ludovico Caldara
 
PDF
Oracle Drivers configuration for High Availability
Ludovico Caldara
 
PDF
Long live to CMAN!
Ludovico Caldara
 
PDF
Let your DBAs get some REST(api)
Ludovico Caldara
 
PDF
Effective Oracle Home Management - UKOUG_Tech18
Ludovico Caldara
 
PDF
Effective Oracle Home Management in the new Release Model era
Ludovico Caldara
 
PPTX
Oracle Active Data Guard 12cR2. Is it the best option?
Ludovico Caldara
 
PPTX
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
Ludovico Caldara
 
PPTX
Get the most out of Oracle Data Guard - OOW version
Ludovico Caldara
 
PDF
ADAPTIVE FEATURES OR: HOW I LEARNED TO STOP WORRYING AND TROUBLESHOOT THE BOMB
Ludovico Caldara
 
PDF
Oracle Client Failover - Under The Hood
Ludovico Caldara
 
PPTX
Adaptive Features or: How I Learned to Stop Worrying and Troubleshoot the Bomb.
Ludovico Caldara
 
PPTX
Database Migration Assistant for Unicode (DMU)
Ludovico Caldara
 
PPTX
Migrating to Oracle Database 12c: 300 DBs in 300 days.
Ludovico Caldara
 
PDF
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Ludovico Caldara
 
Oracle Fleet Patching and Provisioning Deep Dive Webcast Slides
Ludovico Caldara
 
Oracle Drivers configuration for High Availability, is it a developer's job?
Ludovico Caldara
 
Oracle Drivers configuration for High Availability
Ludovico Caldara
 
Long live to CMAN!
Ludovico Caldara
 
Let your DBAs get some REST(api)
Ludovico Caldara
 
Effective Oracle Home Management - UKOUG_Tech18
Ludovico Caldara
 
Effective Oracle Home Management in the new Release Model era
Ludovico Caldara
 
Oracle Active Data Guard 12cR2. Is it the best option?
Ludovico Caldara
 
How to bake a Customer Story with With Windows, NVM-e, Data Guard, ACFS Snaps...
Ludovico Caldara
 
Get the most out of Oracle Data Guard - OOW version
Ludovico Caldara
 
ADAPTIVE FEATURES OR: HOW I LEARNED TO STOP WORRYING AND TROUBLESHOOT THE BOMB
Ludovico Caldara
 
Oracle Client Failover - Under The Hood
Ludovico Caldara
 
Adaptive Features or: How I Learned to Stop Worrying and Troubleshoot the Bomb.
Ludovico Caldara
 
Database Migration Assistant for Unicode (DMU)
Ludovico Caldara
 
Migrating to Oracle Database 12c: 300 DBs in 300 days.
Ludovico Caldara
 
Oracle RAC, Oracle Data Guard, and Pluggable Databases: When MAA Meets Oracle...
Ludovico Caldara
 

Recently uploaded (20)

PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Python basic programing language for automation
DanialHabibi2
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 

Oracle Active Data Guard and Global Data Services in Action!

  • 1. BASEL BERN BRUGG DÜSSELDORF FRANKFURT A.M. FREIBURG I.BR. GENEVA HAMBURG COPENHAGEN LAUSANNE MUNICH STUTTGART VIENNA ZURICH Oracle Active Data Guard and Global Data Services in Action! Robert Bialek Principal Consultant Partner Trivadis SA Ludovico Caldara Oracle ACE Senior Consultant Trivadis SA
  • 2. About Ludovico Caldara Global Data Services in Action!2 08/12/2015 ■ 16 Years DBA (Not Only Oracle) ▪ I do it everywhere (even Windows) ■ RAC ATTACK Ninja & co-writer ■ VP, SOUG & ITOUG Board member ■ OCP (11g, 12c, MySQL) & OCE ■ Italian living in Switzerland ■ http://www.ludovicocaldara.net ■ @ludodba ■ ludovicocaldara Opinions are my own
  • 3. Our company. Global Data Services in Action!3 08/12/2015 Trivadis is a market leader in IT consulting, system integration, solution engineering and the provision of IT services focusing on and technologies in Switzerland, Germany, Austria and Denmark. We offer our services in the following strategic business fields: Trivadis Services takes over the interactive operation of your IT systems. O P E R A T I O N
  • 4. COPENHAGEN MUNICH LAUSANNE BERN ZURICH BRUGG GENEVA HAMBURG DÜSSELDORF FRANKFURT STUTTGART FREIBURG BASEL VIENNA With over 600 specialists and IT experts in your region. Global Data Services in Action!4 08/12/2015 14 Trivadis branches and more than 600 employees 200 Service Level Agreements Over 4,000 training participants Research and development budget: CHF 5.0 / EUR 4 million Financially self-supporting and sustainably profitable Experience from more than 1,900 projects per year at over 800 customers
  • 5. Global Data Services in Action!5 08/12/2015 Local Data Services (or how it used to be)
  • 6. Local Data Services (Clusterware) Global Data Services in Action!6 08/12/2015 RAC DB INST1 INST2 Single Client Access Name SERVICE_A $ srvctl add service -database db_unique_name -service service_a -role "[PRIMARY][,PHYSICAL_STANDBY]" -cblgoal { SHORT | LONG } -failovertype {NONE|SESSION|SELECT|TRANSACTION} -failovermethod {NONE | BASIC} -preferred preferred_list -available available_list
  • 7. Local Data Services (Active Data Guard, no Clustware) Global Data Services in Action!7 08/12/2015 PRIMARY STANDBY SERVICE_A_RO CREATE OR REPLACE TRIGGER service_a_ro after startup on database DECLARE role VARCHAR(30); BEGIN SELECT DATABASE_ROLE INTO role FROM V$DATABASE; IF role = 'PRIMARY' THEN DBMS_SERVICE.START_SERVICE(service_a'); ELSE DBMS_SERVICE.START_SERVICE(service_a_ro'); END IF; END; /DB_SITE1 DB_SITE2 SERVICE_A_RW
  • 8. Local Data Services (MAA, Active Data Guard, etc.) Global Data Services in Action!8 08/12/2015 Create services for Primary role on ALL the databases Create services for Standby role on ALL the databases Define connection descriptors with static address list
  • 9. Local Data Services (MAA) Global Data Services in Action!9 08/12/2015 SERVICE_A= (DESCRIPTION_LIST= (LOAD_BALANCE=off) (FAILOVER=on) (DESCRIPTION = (CONNECT_TIMEOUT=5) (TRANSPORT_CONNECT_TIMEOUT=3) (RETRY_COUNT=3) (ADDRESS_LIST= (LOAD_BALANCE=on) (ADDRESS = (PROTOCOL = TCP)(HOST = raca-scan)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = SERVICE_A)) ) (DESCRIPTION = (CONNECT_TIMEOUT=5) (TRANSPORT_CONNECT_TIMEOUT=3) (RETRY_COUNT=3) (ADDRESS_LIST= (LOAD_BALANCE=on) (ADDRESS = (PROTOCOL = TCP)(HOST = racb-scan)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = SERVICE_A)) ) )
  • 10. Local Data Services: not for complex environments Global Data Services in Action!10 08/12/2015 PRIMARY STANDBY STANDBY STANDBY SYNC ASYNC ASYNC
  • 11. Local Data Services: not for complex environments Global Data Services in Action!11 08/12/2015 PRIMARY STANDBY STANDBY STANDBY SYNC ASYNC ASYNC SWISS CLIENTS READ HERE GERMAN CLIENTS READ HERE
  • 12. Local Data Services: not for complex environments Global Data Services in Action!12 08/12/2015 PRIMARY STANDBY STANDBY STANDBY SYNC ASYNC ASYNC IN CASE OF LAG BOTH READ HERE
  • 13. Local Data Services: not for complex environments Global Data Services in Action!13 08/12/2015 PRIMARY STANDBY STANDBY STANDBY SYNC ASYNC ASYNC IN CASE OF PROBLEMS ALL READ FROM PRIMARY
  • 14. Global Data Services are the new big improvement Global Data Services in Action!14 08/12/2015 PRIMARY STANDBY STANDBY STANDBY SYNC ASYNC ASYNC GLOBAL DATA SERVICES INFRASTRUCTURE
  • 15. Global Data Services in Action!15 08/12/2015 Global Data Services Overview
  • 16. Global Data Services - Overview Global Data Services in Action!16 08/12/2015 Introduced in 12.1.0.1 Goal: centralize database service management – In replicated environments – For applications which are replication-aware Extra-cost option: requires Oracle Active Data Guard or Oracle Golden Gate SALES SALES SALES GLOBAL DATA SERVICES INFRASTRUCTURE SERVICE
  • 17. Global Data Services – Big Picture Global Data Services in Action!17 08/12/2015 SALES SALESSALES SALES SALESSALES Golden Gate, Active Data Guard, Streams, […]
  • 18. Global Data Services – Big Picture Global Data Services in Action!18 08/12/2015 Global Service Manager 1 Global Service Manager 2 Global Service Manager 3 Global Service Manager 4 SALES SALESSALES SALES SALESSALES Golden Gate, Active Data Guard, Streams, […] GDS POOL: SALES (sales_rw, sales_ro, sales_rep, …) GDS CATALOG GDS CATALOG
  • 19. Global Data Services – Big Picture Global Data Services in Action!19 08/12/2015 Global Service Manager 1 Global Service Manager 2 Global Service Manager 3 Global Service Manager 4 SALES SALESSALES SALES SALESSALES Golden Gate, Active Data Guard, Streams, […] GDS POOL: SALES (sales_rw, sales_ro, sales_rep, …) GDS CATALOG GDS CATALOG Global Services GDS Pool Databases GDS Pool Databases
  • 20. Global Data Services – How it works? Global Data Services in Action!20 08/12/2015 SALES SALES SALESSALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS 1 Request a connection for a global service to a GSM Service naming: <gs_name>.<gds_pool>.<gds_configuration> 1
  • 21. Global Data Services – How it works? Global Data Services in Action!21 08/12/2015 SALES SALES SALESSALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS 1 2 Request a connection for a global service to a GSM Service naming: <gs_name>.<gds_pool>.<gds_configuration> GSM returns the local listener address (SCAN is bypassed) 1 2
  • 22. Global Data Services – How it works? Global Data Services in Action!22 08/12/2015 SALES SALES SALESSALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS 1 2 3 Request a connection for a global service to a GSM Service naming: <gs_name>.<gds_pool>.<gds_configuration> GSM returns the local listener address (SCAN is bypassed) Connect to the Global Service active locally on the target 1 2 3
  • 23. Global Data Services in Action!23 08/12/2015 Global Data Services Setup
  • 24. Global Data Services - Setup Global Data Services in Action!24 08/12/2015
  • 25. GDS – Catalog/Regions/Pools Global Data Services in Action!25 08/12/2015 Create the GDS catalog administrator account in a 12c database – For CDBs it must be a common user (or ORA-45562 raised) Internally, the GDS catalog data is stored in the schema GSMADMIN_INTERNAL (tables, PL/SQL code, jobs, types,…) SQL> CREATE USER c##gsm_admin IDENTFIED BY <password>; SQL> GRANT gsmadmin_role TO c##gsm_admin; GDSCTL> CREATE CATALOG -database gsm01.trivadis.com:1521/repo_site1.trivadis.com -user c##gsm_admin/<password> -region germany,switzerland #default region: regionora -gdspool sales,order_entry #default pool: dbpoolORA -configname tvddbcloud #default name: oradbcloud -autovncr on GDS POOL GDS Region12c
  • 26. Global Service Manager Global Data Services in Action!26 08/12/2015 To connect to the catalog database, GSM uses the GSMCATUSER database account Each GSM needs to be registered in the GDS configuration GSM needs to be started and integrated in the cluster/OS startup procedures SQL> ALTER USER GSMCATUSER ACCOUNT UNLOCK; SQL> ALTER USER GSMCATUSER IDENTFIED BY <password>; GDSCTL> ADD GSM -gsm gsm1 -listener 1530 -catalog gds01.trivadis.com:1521/repo_site1.trivadis.com -region germany -wpwd <password> "gsmcatuser" password: Create credential oracle.security.client.connect_string1 GSM successfully added GDSCTL> START GSM –gsm gsm1 Wallet stored in $TNS_ADMIN/gsmwallet GSM
  • 27. GDS Pool Databases Global Data Services in Action!27 08/12/2015 For each target GDS pool database, unlock the GSMUSER user A pool database must be added to the correct GDS region One GDS pool can host many pool databases A database can belong only to one GDS pool GDSCTL> ADD DATABASE -connect GDSDB2_SITE1.TRIVADIS.COM -region germany -gdspool order_entry "gsmuser" password: DB Unique Name: GDSDB2_SITE1 SQL> ALTER USER GSMUSER ACCOUNT UNLOCK; SQL> ALTER USER GSMUSER IDENTFIED BY <password>;
  • 28. GDS Pool DBs (Data Guard broker) Global Data Services in Action!28 08/12/2015 PRIMARY STANDBY STANDBY Data Guard config can be added only to an empty GDS pool (or ORA-44881) For each standby database, the region need to be manually specified GDSCTL> ADD BROKERCONFIG -connect db01.trivadis.com:1521/DB1_SITE1.TRIVADIS.COM -pwd <password> -gdspool sales -region germany Catalog connection is established DB Unique Name: GDSDB1_SITE1 GDSCTL> CONFIG DATABASE Name Pool Status Region ---- ---- ------ ------ gdsdb1_site2 sales Ok gdsdb1_site3 sales Ok gdsdb1_site1 sales Ok germany GDSCTL> MODIFY DATABASE -database gdsdb1_site2 -region germany Empty GDS Region
  • 29. Global Data Services in Action!29 08/12/2015 I don’t mind the setup, Show me the services!
  • 30. Global Database Services - Features Global Data Services in Action!30 08/12/2015 Global Data Services support – Local Service Attributes (TAF, rlbgoal, clbgoal, commit outcome…) – Preferred and available databases – Replication lag threshold (ADG only) – Region affinity
  • 31. GDS - Restrictions Global Data Services in Action!31 08/12/2015 Creation of a global service for a target pool database registered in Oracle Restart fails (during registration of a CRS global service resource) For Grid Infrastructure with role separation – Local Listener must run from oracle user, RDBMS_HOME For RAC,the service registration works correctly only with policy-managed database – With administrator-managed RAC databases, the registration does not work (ORA-45540/PRCR-1001) – BUG assigned to development CRS-2509: Resource type 'ora.cluster_vip_net1.type' used in dependency 'hard' does not exist or is not registered srvctl modify listener -user oracle -oraclehome $RDBMS_HOME
  • 32. Global Connection: Client-side Global Data Services in Action!32 08/12/2015 GSALES_RO.TRIVADIS.COM = (DESCRIPTION= (CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(TRANSPORT_CONNECT_TIMEOUT=3)(FAILOVER=ON) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm01.trivadis.com)(PORT=1530)) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm02.trivadis.com)(PORT=1530))) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm03.trivadis.com)(PORT=1530))) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm04.trivadis.com)(PORT=1530))) (CONNECT_DATA= (SERVICE_NAME=gsales_ro.sales.tvddbcloud) (REGION=germany)))
  • 33. Global Connection: Client-side Global Data Services in Action!33 08/12/2015 GSALES_RO.TRIVADIS.COM = (DESCRIPTION= (CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(TRANSPORT_CONNECT_TIMEOUT=3)(FAILOVER=ON) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm01.trivadis.com)(PORT=1530)) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm02.trivadis.com)(PORT=1530))) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm03.trivadis.com)(PORT=1530))) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm04.trivadis.com)(PORT=1530))) (CONNECT_DATA= (SERVICE_NAME=gsales_ro.sales.tvddbcloud) (REGION=germany))) GSMs Region Switzerland GSMs Region Germany
  • 34. Global Connection: Client-side Global Data Services in Action!34 08/12/2015 GSALES_RO.TRIVADIS.COM = (DESCRIPTION= (CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(TRANSPORT_CONNECT_TIMEOUT=3)(FAILOVER=ON) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm01.trivadis.com)(PORT=1530)) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm02.trivadis.com)(PORT=1530))) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm03.trivadis.com)(PORT=1530))) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm04.trivadis.com)(PORT=1530))) (CONNECT_DATA= (SERVICE_NAME=gsales_ro.sales.tvddbcloud) (REGION=germany))) Intra-Region Failover Intra-Region Failover
  • 35. Global Connection: Client-side Global Data Services in Action!35 08/12/2015 GSALES_RO.TRIVADIS.COM = (DESCRIPTION= (CONNECT_TIMEOUT=5)(RETRY_COUNT=3)(TRANSPORT_CONNECT_TIMEOUT=3)(FAILOVER=ON) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm01.trivadis.com)(PORT=1530)) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm02.trivadis.com)(PORT=1530))) (ADDRESS_LIST= (LOAD_BALANCE=ON) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm03.trivadis.com)(PORT=1530))) (ADDRESS=(PROTOCOL = TCP)(HOST=gsm04.trivadis.com)(PORT=1530))) (CONNECT_DATA= (SERVICE_NAME=gsales_ro.sales.tvddbcloud) (REGION=germany))) Inter-Region Failover
  • 36. Global Connection Load Balancing Global Data Services in Action!36 08/12/2015 Client connection requests are routed to the least-loaded database (like SCAN) – Based on performance, interregion network latency, region affinity and CLB/RLB goal GDSCTL> SERVICES -service gsales_ro –support Service "gsales_ro.sales.tvddbcloud" has 3 instance(s). Affinity: LOCALONLY Instance "sales%31", name: "GDSDB2", db: "GDSDB2_SITE1", region: "germany", status: ready. Request ratio: 35.57%, Sessions: 0, Elapsed time: 115.84 ms. Region "germany": RLB Ratio: 2.99%, Response Time: 115.84 ms, Network Factor: 0 UCPS: 0.70 FLAGS: 0 CPU 100.00 Instance "sales%41", name: "GDSDB2", db: "GDSDB2_SITE2", region: "germany", status: ready. Request ratio: 64.43%, Sessions: 0, Elapsed time: 1.28 ms. Region "germany": RLB Ratio: 97.01%, Response Time: 1.28 ms, Network Factor: 0 UCPS: 1.27 FLAGS: 0 CPU 1.00 GDSCTL> ADD SERVICE -gdspool sales -service gsales_ro –clbgoal [SHORT|LONG] –rlbgoal [SERVICE_TIME | THROUGHPUT]
  • 37. Global Connection Region Affinity - Anywhere Global Data Services in Action!37 08/12/2015 GDSCTL> ADD SERVICE -gdspool sales -service sales_rpt -locality ANYWHERE SALES SALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS SALES SALES
  • 38. Global Connection Region Affinity - Anywhere Global Data Services in Action!38 08/12/2015 GDSCTL> ADD SERVICE -gdspool sales -service sales_rpt -locality ANYWHERE SALES SALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS 1 SALES SALES 1 REMOTE LOCAL
  • 39. Global Connection Region Affinity – Local Only Global Data Services in Action!39 08/12/2015 GDSCTL> ADD SERVICE -gdspool sales -service sales_rpt -locality LOCAL_ONLY SALES SALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS SALES SALES
  • 40. Global Connection Region Affinity – Local Only Global Data Services in Action!40 08/12/2015 GDSCTL> ADD SERVICE -gdspool sales -service sales_rpt -locality LOCAL_ONLY SALES SALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS 1 SALES SALES LOCAL
  • 41. Global Connection Region Affinity – Local Only Global Data Services in Action!41 08/12/2015 GDSCTL> ADD SERVICE -gdspool sales -service sales_rpt -locality LOCAL_ONLY SALES SALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS 1 2 SALES SALES LOCAL CRASH
  • 42. Global Connection Region Affinity – Local Only Global Data Services in Action!42 08/12/2015 GDSCTL> ADD SERVICE -gdspool sales -service sales_rpt -locality LOCAL_ONLY SALES SALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS 1 2 3 SALES SALES LOCAL CRASH TNS-12514
  • 43. Global Connection Region Affinity – Region Failover Global Data Services in Action!43 08/12/2015 GDSCTL> ADD SERVICE -gdspool sales -service sales_rpt -locality LOCAL_ONLY –region_failover SALES SALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS SALES SALESSALES SALES
  • 44. Global Connection Region Affinity – Region Failover Global Data Services in Action!44 08/12/2015 GDSCTL> ADD SERVICE -gdspool sales -service sales_rpt -locality LOCAL_ONLY –region_failover SALES SALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS SALES SALESSALES SALES 1 LOCAL
  • 45. Global Connection Region Affinity – Region Failover Global Data Services in Action!45 08/12/2015 GDSCTL> ADD SERVICE -gdspool sales -service sales_rpt -locality LOCAL_ONLY –region_failover SALES SALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS SALES SALESSALES SALES 1 2 LOCAL CRASH
  • 46. Global Connection Region Affinity – Region Failover Global Data Services in Action!46 08/12/2015 GDSCTL> ADD SERVICE -gdspool sales -service sales_rpt -locality LOCAL_ONLY –region_failover SALES SALES Golden Gate, Active Data Guard, Streams, […] GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY DATABASE CLIENTS SALES SALESSALES SALES 1 2 3 LOCAL CRASH REMOTE
  • 47. Region Affinity: CDB & PDBs Global Data Services in Action!47 08/12/2015 In version 12.1.0.2, Region Affinity for a PDB is ignored Current workaround: create a global service for the CDB$ROOT container, drop it and create again with the same name for the target PDB GDSCTL> CONFIG SERVICE -gdspool sales -service gsales_ro Name: gsales_ro Network name: gsales_ro.sales.tvddbcloud Locality: LOCAL_ONLY Region Failover: No PDB: app1 GDSCTL> SERVICES -service gsales_ro Service "gsales_ro.sales.tvddbcloud" has 2 instance(s). Affinity: ANYWHERE Instance "sales%11", name: "GDSDB1", db: "GDSDB1_SITE2", region: "germany", status: ready. Instance "sales%21", name: "GDSDB1", db: "GDSDB1_SITE3", region: "switzerland", status: ready.
  • 48. Global Service Placement/Failover Global Data Services in Action!48 08/12/2015 For each Global Service a placement attribute can be specified GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service> [ -preferred_all | -preferred db1,db2,db3 -available db4 ] DB1 DB2 DB3 DB4 1
  • 49. Global Service Placement/Failover Global Data Services in Action!49 08/12/2015 For each Global Service a placement attribute can be specified GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service> [ -preferred_all | -preferred db1,db2,db3 -available db4 ] DB1 DB2 DB3 DB4 1 2
  • 50. Global Service Placement/Failover Global Data Services in Action!50 08/12/2015 For each Global Service a placement attribute can be specified GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service> [ -preferred_all | -preferred db1,db2,db3 -available db4 ] DB1 DB2 DB3 DB4 1 2 3
  • 51. Global Service Placement/Failover Global Data Services in Action!51 08/12/2015 For each Global Service a placement attribute can be specified GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service> [ -preferred_all | -preferred db1,db2,db3 -available db4 ] DB1 DB2 GDSCTL> relocate service … -old_db db4 -new_db db2 DB3 DB4 1 2 3
  • 52. Role-Based Global Services – Lag Tolerance Global Data Services in Action!52 08/12/2015 Role-based services are supported for pool databases in Data Guard Broker configuration GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service> [ -role PRIMARY | -role PHYSICAL_STANDBY -failover_primary –lag 20 DB1 DB2 PRIMARY DB3 1 STANDBY STANDBY
  • 53. Role-Based Global Services – Lag Tolerance Global Data Services in Action!53 08/12/2015 Role-based services are supported for pool databases in Data Guard Broker configuration GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service> [ -role PRIMARY | -role PHYSICAL_STANDBY -failover_primary –lag 20 DB1 DB2 PRIMARY DB3 1 2 STANDBY STANDBY STANDBYPRIMARYSTANDBY
  • 54. Role-Based Global Services – Lag Tolerance Global Data Services in Action!54 08/12/2015 Role-based services are supported for pool databases in Data Guard Broker configuration GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service> [ -role PRIMARY | -role PHYSICAL_STANDBY -failover_primary –lag 20 DB1 DB2 PRIMARY DB3 1 2 STANDBY STANDBY STANDBYPRIMARYSTANDBY 3 STANDBYPRIMARYSTANDBY LAG>20
  • 55. Role-Based Global Services – Lag Tolerance Global Data Services in Action!55 08/12/2015 Role-based services are supported for pool databases in Data Guard Broker configuration GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service> [ -role PRIMARY | -role PHYSICAL_STANDBY -failover_primary –lag 20 DB1 DB2 PRIMARY DB3 1 2 STANDBY STANDBY STANDBYPRIMARYSTANDBY 3 4 STANDBY STANDBY PRIMARYSTANDBY LAG>20
  • 56. Role-Based Global Services – Lag Tolerance Global Data Services in Action!56 08/12/2015 Role-based services are supported for pool databases in Data Guard Broker configuration GDSCTL> ADD SERVICE -gdspool <gds_pool> -service <service> [ -role PRIMARY | -role PHYSICAL_STANDBY -failover_primary –lag 20 DB1 DB2 PRIMARY DB3 1 2 STANDBY STANDBY STANDBYPRIMARYSTANDBY 3 4 STANDBY STANDBY PRIMARYSTANDBY LAG>20 PRIMARYSTANDBY STANDBY LAG<=20 5
  • 57. Global Data Services in Action!57 08/12/2015 DEMO? GSM03 GSM04 GDS Region: SWITZERLAND GSM01 GSM02 GDS Region: GERMANY OLTP OLTPGSMCAT OLTP Global Services: gsales_rw, gsales_ro Pool: Sales
  • 58. Conclusions Global Data Services in Action!58 08/12/2015 Central Database Service Management Works as expected, minor bugs Perfect for complex environments Extra-cost option (GG or ADG)
  • 59. What's your question? 08/12/2015 Global Data Services in Action!59 Robert Bialek Principal Consultant Partner Trivadis SA Ludovico Caldara Oracle ACE Senior Consultant Trivadis SA