Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> ฐานข้อมูล

Master Oracle GoldenGate: Core Concepts และ Practical Applications

บล็อกนี้สำรวจ basics ของ Oracle GoldenGate และ functions เนื่องจาก decoupled จาก database architecture GoldenGate ช่วย heterogeneous และ homogeneous real-time capture ของ transactional change data capture และ integration

Introduction to Oracle GoldenGate

Oracle GoldenGate เป็น software product replicate, filter, และ transform data จาก database หนึ่งไปอีก database หนึ่ง เปิดใช้งาน replication ระหว่าง Oracle databases และ heterogeneous databases ที่รองรับ

Why use GoldenGate?

  • Data movement real-time ลด latency
  • Move only committed transactions ให้ consistency และ improve performance
  • รองรับ different versions/releases ของ Oracle databases และ heterogeneous databases บน various operating systems
  • Simple architecture, easy configuration
  • High performance minimal overhead สำหรับ underlying databases และ infrastructure

Business Requirements ที่ GoldenGate รองรับ

  • Business continuity และ high availability
  • Initial load และ database migration/upgrades ด้วย zero downtime
  • Data integration
  • Live reporting

How to use GoldenGate

Architectures หลากหลาย: simple unidirectional ถึง complex peer-to-peer ดู topologies ที่ GoldenGate รองรับในรูปภาพ

GoldenGate Logical Architecture

Components/processes ของ GoldenGate architecture:

Manager

Process เริ่ม GoldenGate processes อื่นๆ ต้องรันบน source และ target systems สำหรับ configuration เริ่ม all other GoldenGate processes จัดสรร disk space โดย purge old trails/extract files ต้องมี 1 manager process ต่อ 1 GoldenGate installation

Extract

Extract process = data extraction (data capture ใน GoldenGate) Configured รัน against source mining database รับผิดชับ capture committed DML transactions และ DDL จาก Oracle redo logs เขียน data changes ลง trails/extract files

Trail

Series of files บน disk ที่ GoldenGate เก็บ captured changes รองรับ continuous extraction และ replication Platform-independent binary files at OS level

Replicat

Process ส่ง data ไป target database อ่าน trail บน target database reconstruct DML/DDL operations apply ไป target database

Pump

Pump process (ก็คือ extract process) optional ใน GoldenGate setup Copy trail files ที่มี data ไป target system

Checkpoint

Extract, pump, Replicat processes ใช้ checkpoints track progress ทั้งสองฝั่ง Mark location ของ data changes ที่ retrieved/applied จาก trail files มีประโยชน์เมื่อ processes recover ไม่มี data loss หรือต้องการ starting point หลัง failure

Collector

Collector process รันบน target system เขียน data changes จาก source database ใน target trail files (RMTTRAIL) ก่อน copy ไป RMTTRAIL collector reassembles files

GoldenGate Capture Modes

  • Classic capture
  • Integrated capture

Classic Capture Mode

Original GoldenGate capture mechanism อ่าน data โดยตรงจาก online redo logs และ archived redo logs (where possible) Additional data อาจ fetch จาก database file где necessary

Integrated Capture Mode

Integrated capture (IC) ใน Oracle GoldenGate 11.2.1 เริ่ม available สำหรับ Oracle 11.2.0.3 กับ database-specific bundle patch for Integrated Extract 11.2.x (MOS Note 1411356.1) IC ใช้ log-mining server บน source system หรือ downstream Oracle database 類似 DataGuard logical standby 或 Oracle streams

IC เป็น new form of extract process ย้ายเข้าไปใน source database ใน traditional classic extract, extract ทำงานบน redo logs นอก domain ของ actual database ใน IC, server log miner process เริ่ม extract DML data และ DDL statements สร้าง logical change records (LCR) ส่งให้ GoldenGate memory processes เขียน LCRs ไป local trail files

GoldenGate Replicat Modes

ก่อน version 12.1 Replicat apply transactions serially ต้อง split tables across multiple replicates สำหรับ parallelism Drawbacks: manual configuration multiple replicates/trail files, ไม่สามารถ split tables ที่มี foreign key relationships across replicates

Coordinated และ integrated Replicat modes ใหม่ช่วย apply transactions in parallel บน target database โดยไม่ต้อง manual split tables

Classic Replicat

Target database checkpoint บอก transactions ที่ committed/ไม่ committed Key aspect ของ transactional replication Special characteristics: Apply SQL serially, ต้องใช้ถ้า database version < 11.2.0.4

Coordinated Replicat

Configured Replicat เรียกว่า coordinator เริ่ม additional replicates ตามจำนวน threads Replicat name จำกัด 5 characters threaded replicates มีชื่อ appended 3-digit number (RGGMA, RGGMA001, RGGMA002...) Coordinator ส่ง SQL ไป threads apply parallel ใน committed order

Integrated Replicat

  • Construct LCRs represent source database DML transactions (committed order) DDL applied directly by Replicat Transactions apply parallel ได้
  • Attach to background process ใน target database (database inbound server) ผ่าน lightweight streaming interface
  • Transmit LCRs ไป inbound server apply data ไป target database

สรุป

บล็อกนี้อธิบาย كيفและ why ใช้ GoldenGate architecture และ components ระบุ capture modes และ Replicat modes ใน tool