Oracle Goldengate: Real-Time Access To Real-Time Information
Oracle Goldengate: Real-Time Access To Real-Time Information
Oracle Goldengate: Real-Time Access To Real-Time Information
Gavin Soorma
Senior Principal Consultant, OnCall DBA
Introduction
Oracle buys GoldenGate -transaction closed September 3, 2009
Oracle GoldenGate
High Availability
Continuous Operations
Real-time data integration from Siebel CRM on Oracle to central Teradata Warehouse
GoldenGate moves 150-200 million records per day with 1.5 second latency.
5 way Active-Active configuration provides same data across worldwide plants Zero downtime DB migration to new version using phased approach
Oracle GoldenGate Real-time Access to Real-time Information
Open, modular architecture - Supports heterogeneous sources and targets Maintains transactional integrity - Resilient against interruptions and failures
Reliability
Databases
Capture:
Oracle DB2 Microsoft SQL Server Sybase ASE Teradata
Delivery:
All listed above, plus:
MySQL, TimesTen, Netezza, Greenplum, HP Neoview and any ODBC compatible databases ETL products JMS message queues
Oracle
Operational Reporting
GoldenGate
Reporting Database
ETL
EDW
Data Distribution
Capture
Trail File
Delivery
data data data files files
files
ETL
OLTP
Integration via Messaging Delivery
ETL
JMS / MoM Queue or Topic
Architecture
Manager process Capture Extract process Delivery Replicat process Data Pump Trail files Checkpoints Data definition files Log files, Discard files
GoldenGate Architecture
Source Database
Network (TCP/IP)
Extract
Collector
Transaction Logs
Data Pump
Replicat
Local Trail
Remote Trail
Manager
Manager
Manager process runs on source and target One manager per GoldenGate installation Supports multiple Extract and Replicat processes Starts other GoldenGate processes Performs trail file management purge old extracts Responsible for Event and Error reporting
Extract
Extract process runs on the source system Capture mechanism of GoldenGate Configure extract for
Initial Data Load Online Change Synchronization
Data Pump
Secondary extract group within source GoldenGate configuration Optional When not used, Extract sends data over network to remote trail on destination When used, Extract process writes to local trail. Data Pump reads this trail and writes to the remote trail Data pump isolates the primary extract process from TCP/IP activity Performs data filtering, mapping and conversion Protects against network and target failures
Replicat
Runs on target system Reads and extracts data changes (and DDL changes when configured) Configured for initial load or online change synchronization. Multiple replicat processes to increase throughput Configured with a apply delay if required
Trail Files
Series of files stored on disk to enable continuous extraction and propagation of changes Can exist on the source (local trail), target (remote trail) or on intermediary systems By default 10 MB in size Files are named at configuration time with a two letter identifier and are appended with an unique 6 digit serial number GoldenGate writes to trail files in Universal Data Format a proprietary format This proprietary format enables the heterogeneous data integration Checkpoints provide known position in trail from where to start in case of unexpected failure Records of checkpoints maintained in file on disk or database checkpoint table
Redo/archived log
Capture
Source Trail
Target Trail
Deliver
Target Trail
Deliver
Source Trail
Capture
Bi-directional
Target Database
Support for Oracle RAC Support for ASM Support for index-organized tables (IOTs) with overflow Support for clustered tables Support for object tables Support for object types (UDTs) Support for DDL operations Archived log only (ALO) mode Off-platform capture (LOGSOURCE) Multi-threaded capture
Capture ODBC
backups Coexistence with SQL Server Replication SQL Server Replication components are not required Support tables with no unique key (not supported by SQL Server Replication) Support for computed columns Support for identity columns
9i Solaris
2 3,4 1
Solaris
1. 2. 3. 4.
Start GoldenGate TDMs Capture process Set up Clone database, then Upgrade to 10g Cross platform transportable tablespaces metadata export Use a full database NOROWS export (Views, Packages, etc)
9i Solaris
2 3,4 1 6,7
Solaris
10g
5
1. 2. 3. 4. 5. Start GoldenGate TDMs Capture process Set up Clone database, then Upgrade to 10g Cross platform transportable tablespaces metadata export Use a full database NOROWS export (Views, Packages, etc) Set up a new 10g vanilla target 6. 7.
Linux
Cross platform transportable tablespaces metadata import Full import with IGNORE option
9i Solaris
2 3,4 1 8 6,7
Solaris
10g
5
1. 2. 3. 4. 5. Start GoldenGate TDMs Capture process Set up Clone database, then Upgrade to 10g Cross platform transportable tablespaces metadata export Use a full database NOROWS export (Views, Packages, etc) Set up a new 10g vanilla target 6. 7. 8. 9.
Linux
Cross platform transportable tablespaces metadata import Full import with IGNORE option Start GoldenGate TDM Apply process at target **SWITCHOVER** (not depicted)
9i Solaris
2 3,4 1 8 6,7
Solaris
11
Failback contingency
1. 2. 3. 4. 5. Start GoldenGate TDMs Capture process Set up Clone database, then Upgrade to 10g Cross platform transportable tablespaces metadata export Use a full database NOROWS export (Views, Packages, etc) Set up a new 10g vanilla target
10g
10
6.
Linux
Cross platform transportable tablespaces metadata import 7. Full import with IGNORE option 8. Start GoldenGate TDM Apply process at target 9. Verify data (optional) 10. **SWITCHOVER** (not depicted) 11. Start TDM Capture at target (new source) 12. Start TDM Apply at target (old source)
GoldenGate Veridata
GoldenGate Veridata is a high-speed, low impact data comparison solution
that identifies and reports data discrepancies between two databases, without interrupting those systems or the business processes they support.
High-speed data comparison solution Identifies and reports on data discrepancies between heterogeneous databases with minimal impact on infrastructure Companies can audit and verify large volumes of data across different business applications with certainty It enables users to research root causes of the discrepancies and determine how to remedy the problem and avoid future risk.
GoldenGate Veridata
GoldenGate Director
GoldenGate Director
GoldenGate Demo
Oracle GoldenGate Command Interpreter for Oracle Version 10.4.0.19 Build 002 Linux, x86, 32bit (optimized), Oracle 10 on Sep 17 2009 23:49:42
Copyright (C) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
GGSCI (linux01.oncalldba.com) 2> info all Program MANAGER Status RUNNING Group Lag Time Since Chkpt
Oracle GoldenGate Command Interpreter for Oracle Version 10.4.0.19 Build 002 Linux, x86, 32bit (optimized), Oracle 11 on Sep 29 2009 08:50:50
Copyright (C) 1995, 2009, Oracle and/or its affiliates. All rights reserved.
GGSCI (linux03.oncalldba.com) 2> info all Program MANAGER Status RUNNING Group Lag Time Since Chkpt
GGSCI (linux01.oncalldba.com) 6> info extract ext1 EXTRACT EXT1 Checkpoint Lag Log Read Checkpoint Last Started 2010-08-13 13:12 Status RUNNING 03:00:32 (updated 00:00:00 ago) Oracle Redo Logs 2010-08-13 10:12:23 Seqno 4, RBA 19823616
GGSCI (linux03.oncalldba.com) 5> info replicat rep1 REPLICAT REP1 Checkpoint Lag Log Read Checkpoint Last Started 2010-08-13 13:15 Status RUNNING 00:00:00 (updated 00:00:04 ago) File /home/oracle/goldengate/dirdat/rt000010 2010-08-13 13:12:55.105247 RBA 1030
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> create table myobjects as select * from dba_objects where 1=2; Table created. SQL> alter table myobjects add constraint pk_myobjects 2 primary key (object_id);
Table altered.
INDEX_NAME -----------------------------PK_MYOBJECTS
SQL> !date Fri Aug 13 13:27:01 WST 2010 SQL> insert into myobjects select * from dba_objects where owner='SYS'; 22937 rows created. SQL> commit; Commit complete.
COUNT(*) ---------24278
Replicating from GGS_OWNER.MYOBJECTS to GGS_OWNER.MYOBJECTS: *** Total statistics since 2010-08-13 13:24:33 *** Total inserts 24278.00 Total updates 0.00 Total deletes 0.00 Total discards 0.00 Total operations 24278.00
COUNT(*) ---------0 SOURCE SQL> drop table myobjects; Table dropped. TARGET SQL> select count(*) from myobjects; select count(*) from myobjects * ERROR at line 1: ORA-00942: table or view does not exist