890 likes | 1.16k Views
6-Node Active-Active Oracle GoldenGate. Experiences and Lessons Learned. Luke Davies. Why Pythian. Recognized Leader:
E N D
6-Node Active-Active Oracle GoldenGate • Experiences and Lessons Learned • Luke Davies
Why Pythian • Recognized Leader: • Global industry leader in data infrastructure managed services and consulting with expertise in Oracle, Oracle Applications, Microsoft SQL Server, MySQL, big data and systems administration • Work with over 200 multinational companies such as Forbes.com, Fox Sports, Nordion and Western Union to help manage their complex IT deployments • Expertise: • One of the world’s largest concentrations of dedicated, full-time DBA expertise. Employ 8 Oracle ACEs/ACE Directors • Hold 7 Specializations under Oracle Platinum Partner program, including Oracle Exadata, Oracle GoldenGate & Oracle RAC • Global Reach & Scalability: • 24/7/365 global remote support for DBA and consulting, systems administration, special projects or emergency response
About Luke Davies • Team Technical Lead • Oracle DBA since V6 (1990) • BSc Microbiology • With Pythian since 2008 • Main Focus • Oracle Core • Oracle Performance Tuning
Set Up • Business requirements • High availability • Easily Scalable • Application releases with zero downtime • Database patches/upgrades with zero downtime • Real-time reporting database with no impact to Online users • Other application entry points with no impact to Online users • Original Solution based on • Oracle Standard Edition 10gR2 • GoldenGate V10.4
6-Node Active-Active Oracle GoldenGate • Experiences and Lessons Learned
Topics • Active/Active considerations • Supplemental Logging • DDL Replication • Conflict Avoidance • Conflict Detection • Release Management • Data comparison • General considerations • Trail file deletion • Archive log deletion
Supplemental Logging • Required at the database level (Minimum Level) • ALTER DATABASE ADD SUPPLEMENTAL LOG DATA; • Minimal Supplemental Logging “logs the minimal amount of information needed for LogMiner to identify, group, and merge the redo operations associated with DML changes” • Identification key logging (PK, UK, FK) • Table Level • Database Level • Method • SQL e.g. ALTER TABLE <> ADD SUPPLEMENTAL LOG DATA … • GoldenGate e.g. ADD TRANDATA <Table Name> • Cost of Omission Changes may fail
Supplemental Logging Drop SL for all named columns
Supplemental Logging No SL In Target TBL4 in Target
Supplemental Logging SL for all columns is dropped SL for ID is added (PK)
Supplemental Logging NO SL In Target YET !!
Supplemental Logging What if we keep running replication this way
Supplemental Logging What if we keep running replication this way
Supplemental Logging What if we keep running replication this way
Supplemental Logging What if we keep running replication this way Missing Value!
Supplemental Logging What if supplemental logging is enabled on target
Supplemental Logging What if supplemental logging is enabled on target
Supplemental Logging What if supplemental logging is enabled on target
Supplemental Logging What if supplemental logging is enabled on target
Supplemental Logging What if supplemental logging is enabled on DB level
Supplemental Logging What if supplemental logging is enabled on DB level
Supplemental Logging What if supplemental logging is enabled on DB level
Supplemental Logging What if supplemental logging is enabled on DB level
Supplemental Logging Supplemental logging is critical to healthy replication specially for tables with update/delete changes PK UK Existing object KEYCOLs Supplemental logging ALL New object
Supplemental Logging PK UK Existing object KEYCOLs Supplemental logging ALL New object DDLOPTIONS & ADDTRANDATA & GETREPLICATES & REPORT To add SL to source DB To replicat add SL to target
Supplemental Logging No SL operations
Supplemental Logging No SL operations
Supplemental Logging • Problem documented in MOS 1472420.1 “If your TRANSLOGOPTIONS EXCLUDEUSER specified in the Extract is the same as the EXTRACT USERID, the DDL to add supplemental logging is not captured and sent to the target.” • Our extract settings were • USERID ggadmin • TRANLOGOPTIONS EXCLUDEUSER ggadmin Extract USER ID and Replicat USER ID should be different
Supplemental Logging GETREPLICATES does not work as it is expected
Supplemental Logging ADDTRANDATA on source for new object. Monitor replicated object on target and add SL manually before any DML change
Supplemental Logging SCHEMATRANDATA In GoldenGate 11.1 OGG-01783 Cannot verify existence of table function that is required to enable schema level supplemental logging, failed to find function DB Patches needed to support SCHEMATRANDATA in OGG (Oracle GoldenGate), OGG-01783 Cannot verify existence of table function that is required to enable schema [MOS 1426440.1] To use SCHEMATRANDATA, please apply the fix in bug 13794550 Only on some platforms
Supplemental Logging Lessons Learned • Supplemental logging is critical for proper function • Different users needed for extract and replicat • Add trandata manually for replicated nodes • Need to monitor schema for tables without trandata • Use SCHEMATRANDATA if you can
Topics • Active/Active considerations • Supplemental Logging • DDL Replication • Conflict Avoidance • Conflict Detection • Release Management • Data comparison • General considerations • Trail file deletion • Archive log deletion
DDL Replication Missing Value!