Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Application High Availability and
Upgrades Using Oracle GoldenGate
March 2016
We are a global systems integrator specializing on the Oracle platform
•  Specialized Group Within Accenture Operations
– ...
Infrastructure Principal
•  17 years of Oracle Experience
•  Completed multiple Sybase to Oracle RAC conversions
•  Migrat...
4
Agenda
•  Planning for an Active / Active Solution
•  GoldenGate Architecture
•  Replication Topology
•  GoldenGate Conf...
Planning for an Active / Active Database Solution
5Copyright © 2015 Accenture All rights reserved.
6
Planning for an Active / Active Database Solution
•  Why Active / Active
–  Elimination of planned downtime
–  Data loca...
7
Planning for an Active / Active Database Solution
•  What SMEs should be involved
•  Transaction Mapping
•  Main goal is...
GoldenGate Architecture
8Copyright © 2015 Accenture All rights reserved.
9
GoldenGate Architecture - Overview
Capture
–  Extracts committed
transactions by reading
transaction logs
–  Transaction...
10
GoldenGate Architecture - Topology
Copyright © 2015 Accenture All rights reserved.
11
GoldenGate Architecture - Topology
•  Understand and document where data flows
•  Stick to traditional topologies
•  Av...
12
Front End Network Architecture - Topology
–  Imperative that your networking team is involved
–  Global Site Selector a...
Prepare GoldenGate
13Copyright © 2015 Accenture All rights reserved.
14
Prepare GoldenGate
Conflict Detection and Resolution
•  Create, verify and document a CDR decision matrix
–  Rule based...
15
Hardware Preparations
•  Disk for trail files
–  ACFS / DBFS / NAS
•  Leverage Clusterware for failover management
–  U...
16
Prepare GoldenGate
Clusterware Preparations
•  Add a VIP:
–  srvctl add network -k 2 -S 192.168.56.0/255.255.255.0/eth3...
17
Prepare GoldenGate
Clusterware Preparations
•  Bundled XA Agent is Preferred (MOS 1527310.1)
–  Separate Install
–  Get...
18
Schema Preparations
•  Sequences
–  Avoid Even / Odd Strategy
–  N+10 Strategy
–  Sequence Rollover
•  Identity columns...
19
Prepare GoldenGate
Table Preparation
•  Trandata
•  Understand columns for CDR
•  Keep it Simple by Using the Same Colu...
20
Prepare GoldenGate
Trail File Additional Data and Data Protection
•  Exception handling
•  Consider Metadata to Include...
21
Target System CDR Parameters
•  Integrated and Classic Replicat:
–  COMPARECOLS
–  ON UPDATE KEYINCLUDING (LAST_UPDT_TM...
22
Prepare GoldenGate
Exception Handling
–  Log All Occurrences of CDR Actions
–  Triggered by Exception Handling of Prior...
Application Changes / Database Maintenance
23Copyright © 2015 Accenture All rights reserved.
24
Application Changes / Database Maintenance
•  Decide / Document / Test allowable Changes
•  Make sure Everything is Sti...
25
Application Changes / Database Maintenance
Example Implementation Steps
•  Modify GSS to Failover Traffic From One Site...
CDR Monitoring
26Copyright © 2015 Accenture All rights reserved.
27
CDR Monitoring
–  Report CDR stats via ggsci interface
•  stats replicat [replicat name] report cdr
Cumulative totals f...
28
CDR Monitoring
–  Report CDR stats to the report file
•  send replicat [replicat name] report
From Table SOE.INVENTORIE...
29
CDR Monitoring
–  Report CDR stats to a table (enabled in replicat parameter file)
•  @GETENV ('STATS','CDR_CONFLICTS')...
30
CDR Monitoring
Why is There a Performance Difference?
*** Total statistics since 2016-02-24 19:19:32 ***
Total inserts/...
Questions?
31Copyright © 2015 Accenture All rights reserved.
Upcoming SlideShare
Loading in …5
×

Application High Availability and Upgrades Using Oracle GoldenGate

177 views

Published on

This presentation will discuss the techniques and methods used to deploy a High Availability Active / Active configuration using Oracle GoldenGate. Discussion will surround deploying GoldenGate utilizing the built in Conflict Detection and Resolution (CDR) functionality as well as the other configuration items needed for a true active / active system. Focus will also be given to the other IT resources that must be involved in order to achieve a successful deployment.

Published in: Design
  • Be the first to comment

  • Be the first to like this

Application High Availability and Upgrades Using Oracle GoldenGate

  1. 1. Application High Availability and Upgrades Using Oracle GoldenGate March 2016
  2. 2. We are a global systems integrator specializing on the Oracle platform •  Specialized Group Within Accenture Operations –  120 Consultants with an average of 15+ years of Oracle experience –  Worldwide leader in Exadata implementations (500+ performed to date) –  21 Oracle ACE members and directors •  Numerous Oracle specializations •  Accenture Engineered Systems Innovation Center •  http://registration.accenture.com/ehome/e4/home Accenture Enkitec Group Copyright © 2015 Accenture All rights reserved. 2 •  Oracle Data Warehouse •  Oracle Real Application Cluster •  Oracle Performance Tuning •  Oracle Database Security •  Oracle Database •  Oracle Exadata •  Oracle GoldenGate •  Oracle Data Integrator
  3. 3. Infrastructure Principal •  17 years of Oracle Experience •  Completed multiple Sybase to Oracle RAC conversions •  Migrated numerous systems using Oracle GoldenGate to Oracle Engineered Systems •  Designed and deployed an Active / Active database solution for a shipment tracking system •  Architected a solution to process xml messages using Oracle XMLDB •  Visit my blog @ stborden.wordpress.com Shane Borden Copyright © 2015 Accenture All rights reserved. 3
  4. 4. 4 Agenda •  Planning for an Active / Active Solution •  GoldenGate Architecture •  Replication Topology •  GoldenGate Conflict Detection and Resolution •  Demonstration •  Monitoring •  Summary •  Questions Copyright © 2015 Accenture All rights reserved.
  5. 5. Planning for an Active / Active Database Solution 5Copyright © 2015 Accenture All rights reserved.
  6. 6. 6 Planning for an Active / Active Database Solution •  Why Active / Active –  Elimination of planned downtime –  Data locality –  RPO vs. RTO –  Use of all purchased capacity –  Risk-free failover testing –  Load balancing •  Potential issues of Active / Active –  Scenario or rule based approach for data collisions –  Handling of a Switchover –  Application Compatibility –  Performance and Acceptable Transaction Latency –  Cost Copyright © 2015 Accenture All rights reserved.
  7. 7. 7 Planning for an Active / Active Database Solution •  What SMEs should be involved •  Transaction Mapping •  Main goal is to MINIMIZE DATA CONFLICTS •  Discuss application behavior should LAG occur •  Determine maximum tolerance for site downtime •  GoldenGate vs. DataGuard •  Consider introducing Data Guard to handle local failure Copyright © 2015 Accenture All rights reserved.
  8. 8. GoldenGate Architecture 8Copyright © 2015 Accenture All rights reserved.
  9. 9. 9 GoldenGate Architecture - Overview Capture –  Extracts committed transactions by reading transaction logs –  Transactions written to a trail file –  Transaction filtering and transformation available –  Classic or Integrated mode (if on Oracle) Delivery –  Applies trail records to target while maintaining transactional integrity –  Transaction filtering and transformation available –  SQL Apply or Integrated mode (if on Oracle) Copyright © 2015 Accenture All rights reserved. Pump –  Routes and writes trails to target location. –  Transaction filtering and transformation available –  Encryption and compression also available
  10. 10. 10 GoldenGate Architecture - Topology Copyright © 2015 Accenture All rights reserved.
  11. 11. 11 GoldenGate Architecture - Topology •  Understand and document where data flows •  Stick to traditional topologies •  Avoid Hub and Spoke –  Unless your design specifically anticipates that from the start Copyright © 2015 Accenture All rights reserved.
  12. 12. 12 Front End Network Architecture - Topology –  Imperative that your networking team is involved –  Global Site Selector and Load Balancers are an important piece of the puzzle –  Needed to isolate sites at time of upgrades –  Also needed in order to ‘stick’ traffic to one site or another Copyright © 2015 Accenture All rights reserved.
  13. 13. Prepare GoldenGate 13Copyright © 2015 Accenture All rights reserved.
  14. 14. 14 Prepare GoldenGate Conflict Detection and Resolution •  Create, verify and document a CDR decision matrix –  Rule based resolution •  Decide which column is going to be used for decision process –  Oftentimes inserted or last updated date is used –  Other business rules •  Ensure there is a process to periodically review conflicts •  Excessive conflicts cause LAG •  Additional Parameters Required for CDR –  Integrated vs. Classic Copyright © 2015 Accenture All rights reserved.
  15. 15. 15 Hardware Preparations •  Disk for trail files –  ACFS / DBFS / NAS •  Leverage Clusterware for failover management –  Utilize a VIP address for delivery process –  Use oraagent script or bundled XA Agents (Preferred) to manage manager / extract / replicat –  Be aware that clusterware now controls GoldenGate •  Proper supplemental logging •  Consider other bottlenecks –  I/O Performance Copyright © 2015 Accenture All rights reserved. Prepare GoldenGate
  16. 16. 16 Prepare GoldenGate Clusterware Preparations •  Add a VIP: –  srvctl add network -k 2 -S 192.168.56.0/255.255.255.0/eth3 –v –  srvctl add vip -n orcl11g-rac1 -k 2 -A 192.168.56.0/255.255.255.0/eth3 -v –  crsctl stat type ora.cluster_vip_net2.type –  appvipcfg create -network=2 -ip=192.168.56.177 -vipname=orcl11g-ggvip -user=oracle •  Add Clusterware Resource (deprecated): –  crsctl add resource orcl11g-rac1-ggateapp -type cluster_resource -attr "ACTION_SCRIPT= $CRS_HOME/crs/public/goldengate_action.sh, CHECK_INTERVAL=30, START_DEPENDENCIES='hard(orcl11g-ggvip) pullup(orcl11g-ggvip)', STOP_DEPENDENCIES='hard(orcl11g-ggvip)',ACL='owner:oracle:rwx,pgrp:dba:rwx,other::r--', SCRIPT_TIMEOUT=360” •  Additional Script Needed / Lots of Moving Parts Copyright © 2015 Accenture All rights reserved.
  17. 17. 17 Prepare GoldenGate Clusterware Preparations •  Bundled XA Agent is Preferred (MOS 1527310.1) –  Separate Install –  Get Latest Version –  Pre-Create the VIP or let the Bundled Agent Create –  agctl add goldengate gg_soe --gg_home /acfsmounts/acfsvol1/ogg --instance_type source --nodes orcl11g-rac1,orcl11g-rac2 --vip_name orcl11g-ggvip --filesystems ora.acfs.acfsvol1.acfs --databases ora.vboxrac.db --oracle_home /u01/app/oracle/product/11.2.0.4/db --monitor_extracts E_SOE_R1,P_SOE_R1 Copyright © 2015 Accenture All rights reserved.
  18. 18. 18 Schema Preparations •  Sequences –  Avoid Even / Odd Strategy –  N+10 Strategy –  Sequence Rollover •  Identity columns in 12c •  Understand application changes necessary for CDR –  Trigger based –  Application Maintained –  Mixture Copyright © 2015 Accenture All rights reserved. Prepare GoldenGate
  19. 19. 19 Prepare GoldenGate Table Preparation •  Trandata •  Understand columns for CDR •  Keep it Simple by Using the Same Column for CDR •  Determine method to instantiate data used for Conflict Detection / Resolution (CDR) •  Instantiate CDR Column –  Beware the NULL Value in Some Versions of GoldenGate –  One Site or All Sites Copyright © 2015 Accenture All rights reserved.
  20. 20. 20 Prepare GoldenGate Trail File Additional Data and Data Protection •  Exception handling •  Consider Metadata to Include in Trail •  Useful in the Debugging / Error Handling Process •  Can be Used in Rule Based Apply Within Replicat •  Handle Potential Transaction Loopback •  EXCLUDEUSER •  Process Tags in a Trail Record •  TRANLOGOPTIONS EXCLUDETAG (extract) •  DBOPTIONS SETTAG (replicat) Copyright © 2015 Accenture All rights reserved.
  21. 21. 21 Target System CDR Parameters •  Integrated and Classic Replicat: –  COMPARECOLS –  ON UPDATE KEYINCLUDING (LAST_UPDT_TMSTP) –  ON DELETE KEYINCLUDING (LAST_UPDT_TMSTP)) –  UPDATEROWEXISTS, (DEFAULT, USEMAX (LAST_UPDT_TMSTP)) –  INSERTROWEXISTS, (DEFAULT, USEMAX (LAST_UPDT_TMSTP)) –  DELETEROWEXISTS, (DEFAULT, OVERWRITE) –  UPDATEROWMISSING, (DEFAULT, OVERWRITE) –  DELETEROWMISSING, (DEFAULT, DISCARD) –  REPERROR (DEFAULT, EXCEPTION); •  Classic Replicat or Mixed Extract / Replicat Requires Additional Parameters GETUPDATEBEFORES Copyright © 2015 Accenture All rights reserved. Prepare GoldenGate Source System CDR Parameters •  Supplemental logging ALLCOLS always required •  Integrated Extract: TRANLOGOPTIONS INTEGRATEDPARAMS (...) LOGALLSUPCOLS UPDATERECORDFORMAT COMPACT •  Classic Extract or Mixed Integrated / Classic: GETUPDATEBEFORES NOCOMPRESSDELETES NOCOMPRESSUPDATES •  Don’t Forget Token Data
  22. 22. 22 Prepare GoldenGate Exception Handling –  Log All Occurrences of CDR Actions –  Triggered by Exception Handling of Prior Map Statement –  Decide Which Metadata to Include •  @DATE ('YYYY-MM-DD HH:MI:SS.FFFFFF', 'JTS', @GETENV ('JULIANTIMESTAMP')) •  @GETENV –  RECORD –  GGENVIRONMENT –  GGHEADER –  LASTERR –  TRANSACTION –  STATS •  @BEFORE Copyright © 2015 Accenture All rights reserved.
  23. 23. Application Changes / Database Maintenance 23Copyright © 2015 Accenture All rights reserved.
  24. 24. 24 Application Changes / Database Maintenance •  Decide / Document / Test allowable Changes •  Make sure Everything is Still Backward Compatible with Existing Trail Data –  Not null to null –  Column expansion –  Addition of Indexes –  Column addition •  Methodology also Useful for Database Maintenance –  Index Maintenance –  Table Shrink / HWM Modification –  Partitioning Changes Copyright © 2015 Accenture All rights reserved.
  25. 25. 25 Application Changes / Database Maintenance Example Implementation Steps •  Modify GSS to Failover Traffic From One Site to Another •  Implement Schema Changes / Database Maintenance •  Modify GSS to Failover Traffic to Upgraded Site •  Complete Schema Changes / Database Maintenance on Other Site •  Modify GSS to Allow Traffic at Both Sites Copyright © 2015 Accenture All rights reserved.
  26. 26. CDR Monitoring 26Copyright © 2015 Accenture All rights reserved.
  27. 27. 27 CDR Monitoring –  Report CDR stats via ggsci interface •  stats replicat [replicat name] report cdr Cumulative totals for specified table(s): *** Total statistics since 2016-02-24 19:19:32 *** Total inserts 0.00 Total updates 1815508.00 Total deletes 0.00 Total discards 0.00 Total operations 1815508.00 Total CDR conflicts 900204.00 CDR resolutions succeeded 900204.00 CDR UPDATEROWEXISTS conflicts 866829.00 CDR UPDATEROWMISSING conflicts 33375.00 Copyright © 2015 Accenture All rights reserved.
  28. 28. 28 CDR Monitoring –  Report CDR stats to the report file •  send replicat [replicat name] report From Table SOE.INVENTORIES to SOE.INVENTORIES: # inserts: 0 # updates: 915304 # deletes: 0 # discards: 0 # CDR conflicts : 900204 # CDR resolutions succeeded : 900204 # CDR UPDATEROWEXISTS conflicts : 866829 # CDR UPDATEROWMISSING conflicts: 33375 From Table SOE.INVENTORIES to SOE.CONFLICT_LOG: # inserts: 0 # updates: 900204 # deletes: 0 # discards: 0 Copyright © 2015 Accenture All rights reserved.
  29. 29. 29 CDR Monitoring –  Report CDR stats to a table (enabled in replicat parameter file) •  @GETENV ('STATS','CDR_CONFLICTS') •  @GETENV ('STATS','CDR_RESOLUTIONS_SUCCEEDED') •  @GETENV ('STATS','CDR_RESOLUTIONS_FAILED’) Copyright © 2015 Accenture All rights reserved.
  30. 30. 30 CDR Monitoring Why is There a Performance Difference? *** Total statistics since 2016-02-24 19:19:32 *** Total inserts/second: 0.00 Total updates/second: 596.70 Total deletes/second: 0.00 Total discards/second: 0.00 Total operations/second: 596.70 *** Total statistics since 2016-02-24 20:24:04 *** Total inserts/second: 0.00 Total updates/second: 1572.29 Total deletes/second: 0.00 Total discards/second: 0.00 Total operations/second: 1572.29 Copyright © 2015 Accenture All rights reserved.
  31. 31. Questions? 31Copyright © 2015 Accenture All rights reserved.

×