Understanding GoldenGate

Similar presentations


Presentation on theme: "Understanding GoldenGate"— Presentation transcript:

1 Understanding GoldenGate
Julian Dyke Independent Consultant Web Version juliandyke.com

2 Agenda Introduction Configuration Redo versus Trail

3 Introduction

4 GoldenGate Introduction
Oracle GoldenGate is a heterogeneous replication solution GoldenGate (the company and the product) was acquired by Oracle Corporation in 2009. GoldenGate supports: Zero Downtime Upgrade and Migration System Integration / Data Synchronization Query and Report offloading Real-time Data distribution Real-time Data Warehousing Live standby database Active-active high availability Controversial replacement for Oracle Streams

5 GoldenGate Supported Topologies
Unidirectional Bi-directional Peer-to-Peer Reporting Instance Instant Failover, Active-Active Load Balancing, High Availability Broadcast Consolidation Cascading Data Distribution Data Warehouse Scalability, Database Tiering

6 GoldenGate Supported Databases
Oracle GoldenGate for Non Oracle Databases Supported non-oracle databases include: IBM DB2 on Windows, UNIX and Linux Microsoft SQL Server 2000, 2005, 2008 Sybase on Windows, UNIX and Linux Teradata on Windows, UNIX and Linux MySQL on Windows, UNIX and Linux TimesTen on Windows and Linux (delivery only)

7 GoldenGate Licensing Both capture and apply databases must be fully licensed Product Processor License Enterprise Edition 47,500 Real Application Clusters 23,000 Active Data Guard 10,000 GoldenGate 17,500 Management Pack for GoldenGate 3,500 Source – Oracle Technology Global Price List – 15 March 2013 GoldenGate licenses (Oracle to Oracle) include: XStream Active Data Guard Source – Oracle Fusion Middleware Licensing Information 11gR1

8 GoldenGate Conventions
This presentation was developed in Oracle GoldenGate Virtual Box 4.2.0 Oracle Enterprise Linux 5 Update 6 Oracle Database Environment: Name Abbreviation Value Home Directory $GG_HOME /home/oracle/goldengate GoldenGate Schema GGSCHEMA GG01 Databases: Source Target Hostname vm4 vm5 Database Name NORTH SOUTH

9 GoldenGate Streams versus GoldenGate
Oracle Streams Capture Propagate Apply Source Server Target Server Oracle GoldenGate Extract Data Pump Replicat Source Server Target Server

10 GoldenGate Basic Architecture
Manager Manager Extract Data Pump Replicat Source Database Local Trail Remote Trail Target Database Source Server Target Server

11 GoldenGate Configuration Options
Classic Capture Integrated Capture Redo Logs + Archive Logs Archive Logs Only Upstream Capture Downstream Capture

12 GoldenGate Classic Capture
Extract Data Pump Online Redo/Archive Logs Source Database Local Trail

13 GoldenGate Integrated Capture
LCR LCR LCR Log Miner Extract Data Pump Online Redo/Archive Logs Source Database Local Trail

14 GoldenGate Downstream Capture
Real Time Downstream Mode Capture LCR LCR Logical Change Records Online Redo Logs Standby Redo Logs Integrated Extract Trail File Primary Database Standby Database Source Server Downstream Server

15 GoldenGate Downstream Capture
Downstream Archive Log Mode Capture LCR LCR Logical Change Records Online Redo Logs Archive Redo Logs Integrated Extract Trail File Primary Database Standby Database Source Server Downstream Server

16 GoldenGate Bi-Directional Replication
Also known as Active-Active Replication Online Redo Logs Local Trail Remote Trail Capture Data Pump Replicat Replicat Data Pump Capture Remote Trail Local Trail Online Redo Logs Server A Server B

17 GoldenGate Supported Data Types
The following data types are supported for both classic and integrated capture NUMBER BINARY FLOAT BINARY DOUBLE CHAR VARCHAR2 LONG NCHAR NVARCHAR2 RAW LONG RAW DATE TIMESTAMP

18 GoldenGate Supported Data Types
There is limited support in classic capture for the following data types: INTERVAL DAY INTERVAL YEAR TIMESTAMP WITH TIME ZONE TIMESTAMP WITH LOCAL TIME ZONE The following data types are not supported Abstract data types with scalar, LOBs, VARRAYs, nested tables , REFS ANYDATA ANYDATASET ANYTYPE BFILE MLSLABEL ORDDICOM TIMEZONE_ABBR URITYPE UROWID

19 GoldenGate Supported Data Types
The following data types are supported for both classic and integrated capture NUMBER BINARY FLOAT BINARY DOUBLE CHAR VARCHAR2 LONG NCHAR NVARCHAR2 RAW LONG RAW DATE TIMESTAMP

20 GoldenGate Restrictions
Neither capture method supports Database replay EXTERNAL tables Materialized views with ROWID Classic capture does not support IOT mapping tables Key compressed IOTs XMLType tables stored as XML Object Relational Distributed Transactions XA and PDML distributed transactions Capture from OLTP table compressed tables Capture from compressed tablespaces Exadata Hybrid Columnar Compression (EHCC)

21 GoldenGate Oracle-Reserved Schemas
The following schema names are reserved by Oracle and should not be configured for GoldenGate replication: $AURORA EXFSYS REPADMIN $JIS MDSYS SYS $ORB ODM SYSMAN $UNAUTHENTICATED ODM_MTR SYSTEM $UTILITY OLAPSYS TRACESVR ANONYMOUS ORDPLUGINS WKPROXY AURORA ORDSYS WKSYS CTXSYS OSE$HTTP$ADMIN WMSYS DBSNMP OUTLN XDB DMSYS PERFSTAT DSSYS PUBLIC

22 GoldenGate RAC Support
RAC support has some limitations in classic capture mode Extract can only run against one instance If instance fails, Manager must be stopped on failed node: Manager and extract must be started on a surviving node Failover can be configured in Oracle Grid Infrastructure Additional archive log switching may be required in archive log mode Before shutting down extract process Insert dummy record into a source table Switch log files on all nodes Additional configuration required to access ASM instance Shared storage for trails can be: OCFS ACFS DBFS No mention of NFS in the documentation

23 Configuration

24 GoldenGate Installation
Download the following from ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip Zip file is approximately 90MB On each server create GG_HOME mkdir /home/oracle/goldengate Copy zip file to GG_HOME $ cd /home/oracle/goldengate $ unzip ogg112101_fbo_ggs_Linux_x64_ora11g_64bit.zip Add GG_HOME to profile export PATH=/home/oracle/goldengate:$PATH export LD_LIBRARY_PATH=/home/oracle/goldengate:$LD_LIBRARY_PATH Install bundle patch in Oracle home for integrated capture

25 GoldenGate GGSCI Most GoldenGate configuration can be performed within GGSCI Command-line utility For a list of available commands: $ ggsci GGSCI 1> HELP For help on with an individual command: GGSCI 2> HELP <command> <object> For example: GGSCI 1> INFO ALL The best source of information is: Oracle GoldenGate Windows and UNIX Reference Guide

26 GoldenGate Parameter Files
Each process has a text-based parameter file Parameter files can be edited using GGSCI or with a text editor ggsci GGSCI (vm5) 1> EDIT PARAMS rep1 Stored in $GG_HOME/dirprm directory e.g. $GG_HOME/dirprm/rep1.prm Comments are prefixed by -- and terminated by end of line -- This is a comment Continuation character is ampersand MAP US03.T54 TARGET US01.T55, & COLMAP (col1=c1, col3=c2, col4=c3, col2=c4);

27 GoldenGate Subdirectories
By convention, configuration and trail files are stored in subdirectories within $GG_HOME Subdirectories are created within GGSCI: ggsci GGSCI (vm4) 1> CREATE SUBDIRS Creating subdirectories under current directory /home/oracle/goldengate Parameter files /home/oracle/goldengate/dirprm: created Report files /home/oracle/goldengate/dirrpt: created Checkpoint files /home/oracle/goldengate/dirchk: created Process status files /home/oracle/goldengate/dirpcs: created SQL script files /home/oracle/goldengate/dirsql: created Database definitions files /home/oracle/goldengate/dirdef: created Extract data files /home/oracle/goldengate/dirdat: created Temporary files /home/oracle/goldengate/dirtmp: created Stdout files /home/oracle/goldengate/dirout: created

28 GoldenGate Schema Owner
A schema owner is required to own GoldenGate objects Can grant specific privileges to owner or just use DBA For example GG01 sqlplus / as sysdba SQL> CREATE USER gg01 IDENTIFIED BY gg01; SQL> GRANT CONNECT, RESOURCE, DBA TO gg01; Schema owner must be specified in GoldenGate parameters file: ggsci GGSCI 1> EDIT PARAMS ./GLOBALS GGSCHEMA gg01 In this example parameter file is /home/oracle/goldengate/GLOBALS

29 GoldenGate Tablespace
Recommended for both source and target servers sqlplus / as sysdba SQL> CREATE TABLESPACE goldengate DATAFILE '/u01/app/oradata/NORTH/goldengate01.dbf‘ SIZE 100M AUTOEXTEND ON; Tablespace created. SQL> ALTER USER gg01 DEFAULT TABLESPACE goldengate; User altered. Ensure AUTOEXTEND is enabled

30 GoldenGate Role On source server create GGS_GGSUSER_ROLE
cd /home/oracle/goldengate sqlplus / as sysdba GGS Role setup script This script will drop and recreate the role GGS_GGSUSER_ROLE Enter GoldenGate schema name:GG01 Grant role to GGSCHEMA user: cd /home/oracle/goldengate sqlplus / as sysdba SQL> GRANT GGS_GGSUSER_ROLE TO gg01;

31 GoldenGate Manager Process
Manager process controls all GoldenGate processes on a server Including extract and replicat processes Configured in parameter file ggsci GGSCI 1> EDIT PARAMS MGR PORT 7809 DYNAMICPORTLIST Manager process is started from GGSCI ggsci GGSCI 2> START MANAGER Executable is $GG_HOME/mgr

32 GoldenGate Extract Process
Captures and stores changes in local trail file Classic capture Captures changes from online redo log or archived redo log Fetches additional data from database Integrated capture Captures changes from log miner Uses extract executable Sample parameter file: EXTRACT ex1 USERID gg01, PASSWORD gg01 EXTTRAIL /home/oracle/goldengate/dirdat/ex TABLE US03.*;

33 GoldenGate Data Pump Process
Propagates contents of local trail file to remote trail file Uses extract executable In basic configurations same functionality can be achieved using extract process Sample parameter file: EXTRACT dp1 USERID gg01, PASSWORD gg01 RMTHOST vm5, MGRPORT 7809 RMTTRAIL /home/oracle/goldengate/dirdat/rt TABLE US03.*;

34 GoldenGate Replicat Process
Reads changes from remote trail and applies them to database Uses replicat executable Sample parameter file: REPLICAT rep1 USERID gg01, PASSWORD gg01 ASSUMETARGETDEFS DISCARDFILE /home/oracle/goldengate/discards, PURGE MAP US03.* TARGET US03.*;

35 GoldenGate Processes and Trails
New processes and trails must be added using GGSCI. For example on the source server: ggsci GGSCI> ADD EXTRACT ex1, TRANLOG, BEGIN NOW GGSCI> ADD EXTTRAIL /home/oracle/goldengate/dirdat/ex, EXTRACT ex1 GGSCI> ADD EXTRACT dp1 EXTTRAILSOURCE /home/oracle/goldengate/dirdat/ex GGSCI> ADD RMTTRAIL /home/oracle/goldengate/dirdat/rt, EXTRACT dp1 On the target server: ggsci GGSCI> ADD REPLICAT rep1, EXTTRAIL /home/oracle/goldengate/dirdat/rt

36 GoldenGate Checkpoint Table
Must exist in target database Records location in trail of last change applied to database Added using GGSCI ggsci GGSCI> DBLOGIN USERID gg01, PASSWORD gg01 GGSCI> ADD CHECKPOINTTABLE gg01.checkpointtable Location must be added to GLOBALS parameters on target server ggsci GGSCI> EDIT PARAMS ./GLOBALS GGSCHEMA gg01 CHECKPOINTTABLE gg01.checkpointtable

37 GoldenGate Starting Processes
Processes are started from GGSCI On the source server ggsci GGSCI> START EXTRACT ex1 GGSCI> START EXTRACT dp1 On the target server ggsci GGSCI> START REPLICAT rep1 The EXTRACT and REPLICAT keywords can be omitted Use equivalent STOP command to stop processes

38 GoldenGate Checking Process Status
Check process status using GGSCI INFO ALL: ggsci GGSCI (vm4.juliandyke.com) 1> INFO ALL Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING DP :00: :00:04 EXTRACT ABENDED DP :00: :23:14 EXTRACT RUNNING EX :00: :00:05 EXTRACT STOPPED EX :00: :34:41 ggsci GGSCI (vm5.juliandyke.com) 1> INFO ALL Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING REPLICAT RUNNING REP :00: :00:05 REPLICAT RUNNING REP :00: :00:04

39 GoldenGate Viewing Log Files
Processes are logged in report files stored in $GG_HOME/dirrpt e.g. ex1 process will be logged in $GG_HOME/dirrpt/EX1.rpt Up to 10 copies are retained EX1.rpt (latest), EX11.rpt, EX12.rpt, … EX19.rpt (oldest) If a process abends then check the report file for details Report files can also be viewed using GGSCI ggsci GGSCI> VIEW REPORT ex1 Output is filtered through more utility

40 GoldenGate Trail Files
Stored in $GG_HOME/dirdat directory by convention User must specify a two-character prefix e.g. ex File names are generated automatically by extract process e.g. ex000000 ex000001 ex000002 etc Naming conventions require some thought

41 GoldenGate Trail Files
Changes are only stored in trail file when a transaction commits If a transaction rolls back then no changes are stored Archive logs must be available for long running transactions Index changes are generally not stored IOT changes are stored Undo changes are not stored Only redo Changes to data dictionary are not stored including Objects, tables, columns, statistics Segments / extents

42 GoldenGate Trail Files – Data Representation
NUMBER 4-byte length followed by ASCII characters e.g. 2013 NULL values are stored as FF FF 00 00 DATE 2-bytes followed by 19 ASCII characters in the format: YYYY-MM-DD:HH24:MI:SS For example :22:39:56 is D D A A A 35 36 NULL values are stored as FF FF

43 GoldenGate Trail Files – Data Representation
VARCHAR2 4-byte length followed by ASCII characters e.g. “GoldenGate” in VARCHAR2(20) A 47 6F 6C E NULL values stored as: FF FF 00 00 CHAR 2-byte length followed by ASCII characters space-padded e.g. “GoldenGate” in CHAR(20) F 6C E NULL values stored as: FF FF

44 GoldenGate Logdump Utility
Dumps contents of GoldenGate trails from Local trail Remote trail To view data set the following parameters: logdump Logdump> GHDR ON Logdump> FILEHEADER DETAIL Logdump> DETAIL DATA Logdump> USERTOKEN DETAIL Logdump> RECLEN 128 Logdump> OPEN <trailFileName> To show next record use NEXT or N Logdump> NEXT # or N To return to start of file Logdump> POS 0

45 GoldenGate Logdump Sample output
Hdr-Ind : E (x45) Partition : (x04) UndoFlag : (x00) BeforeAfter: A (x41) RecLength : (x0033) IO Time : 2013/04/05 06:24: IOType : (x05) OrigNode : (xff) TransInd : (x01) FormatType : R (x52) SyskeyLen : (x00) Incomplete : (x00) AuditRBA : AuditPos : Continued : N (x00) RecCount : (x01) 2013/04/05 06:24: Insert Len RBA 9060 Name: US03.T1 After Image: Partition 4 G m | SY d f 424a f | S OBJERROR$ c | TABLE Column (x0000), Len (x0006) | Column (x0001), Len (x0007) | ....SYS Column (x0002), Len (x000d) f42 4a f | ....OBJERROR$ Column (x0003), Len (x0009) c | ....TABLE

46 GoldenGate Minimal Supplemental Logging
Extract processes will not start unless minimal supplemental logging has been configured in database Minimal supplemental logging is used for: chained blocks blocks in index clusters Minimal supplemental logging is enabled using: SQL> ALTER DATABASE ADD SUPPLEMENTAL LOG DATA;

47 GoldenGate Supplemental Logging
Supplemental logging should be configured for all tables being replicated Enabled using GGSCI. For example: ggsci GGSCI 1> DBLOGIN USERID us01 PASSWORD us01 GGSCI 2> ADD TRANDATA t1 Logging of supplemental redo data enabled for table US01.T1. Internally this executes the following DDL: ALTER TABLE "US01"."T1" ADD SUPPLEMENTAL LOG GROUP "GGS_76111" ("C1") ALWAYS /* GOLDENGATE_DDL_REPLICATION */ where is the OBJ# of the table

48 GoldenGate Sequences Sequences are not supported by default. Additional configuration is required: Sequences will not be identical across the databases Sequence in target database will never be lower than the same sequence on the source database To install sequence support on each server run: cd /home/oracle/goldengate sqlplus / as sysdba The sequence.sql script creates the following procedures in the GGSCHEMA : SEQTRACE GETSEQFLUSH REPLICATESEQUENCE UPDATESEQUENCE

49 GoldenGate Sequences Extract Process
EXTRACT ex1 USERID gg01, PASSWORD gg01 EXTTRAIL /home/oracle/goldengate/dirdat/ex SEQUENCE us03.*; TABLE us03.*; Data Pump process: EXTRACT dp1 USERID gg01, PASSWORD gg01 RMTHOST vm5, MGRPORT 7809 RMTTRAIL /home/oracle/goldengate/dirdat/rt SEQUENCE us03.*; TABLE us03.*; Replicat process: REPLICAT rep1 USERID gg01, PASSWORD gg01 ASSUMETARGETDEFS DISCARDFILE /home/oracle/goldengate/discards, PURGE MAP US03.SEQ1, TARGET US03.SEQ1; MAP US03.T*, TARGET US03.*;

50 GoldenGate TRUNCATE Statements
TRUNCATE statements are not supported by default TRUNCATE support can be configured Standalone As part of full DDL support These options are mutually exclusive Standalone TRUNCATE support Does not support partitioned tables Configure full DDL support for partitions/subpartitions Enabled using GETTRUNCATES parameter Must be specified BEFORE tables/mappings in parameter file

51 GoldenGate TRUNCATE Statements
Extract process EXTRACT ex1 USERID gg01, PASSWORD gg01 EXTTRAIL /home/oracle/goldengate/dirdat/ex GETTRUNCATES TABLE us03.t*; Data pump process EXTRACT dp1 USERID gg01, PASSWORD gg01 RMTHOST vm5, MGRPORT 7809 RMTTRAIL /home/oracle/goldengate/dirdat/rt GETTRUNCATES TABLE us03.t*; Replicat process REPLICAT rep1 USERID gg01, PASSWORD gg01 ASSUMETARGETDEFS DISCARDFILE /home/oracle/goldengate/discards, PURGE GETTRUNCATES MAP US03.*, TARGET US03.*;

52 GoldenGate DDL Support
DDL is not supported by default To install DDL support on the source server: cd /home/oracle/goldengate sqlplus / as sysdba No configuration necessary on target server for DDL support DDL support is implemented using System DDL trigger GGS_DDL_TRIGGER_BEFORE DDL Replication Package GGS_MARKER table GGS_DDL_HIST table

53 GoldenGate DDL Support
Extract process: EXTRACT ex1 USERID gg01, PASSWORD gg01 EXTTRAIL /home/oracle/goldengate/dirdat/ex DDL INCLUDE ALL TABLE US03.t*; Data Pump process: EXTRACT dp1 USERID gg01, PASSWORD gg01 RMTHOST vm5, MGRPORT 7809 RMTTRAIL /home/oracle/goldengate/dirdat/rt DDL INCLUDE ALL TABLE US03.t*; Replicat process REPLICAT rep1 USERID gg01, PASSWORD gg01 ASSUMETARGETDEFS DISCARDFILE /home/oracle/goldengate/discards, PURGE DDL INCLUDE ALL DDLERROR DEFAULT IGNORE MAP US03.*, TARGET US03.*;

54 GoldenGate Mappings Mappings between source and target can be specified At schema level At table level At column level All mappings are performed by the replicat process Mappings are specified in replicat parameter file Schema level mapping REPLICAT rep1 USERID gg01, PASSWORD gg01 ASSUMETARGETDEFS DISCARDFILE /home/oracle/goldengate/discards, PURGE MAP US03.* TARGET US01.*; Table level mapping REPLICAT rep1 USERID gg01, PASSWORD gg01 ASSUMETARGETDEFS DISCARDFILE /home/oracle/goldengate/discards, PURGE MAP US03.T52 TARGET US01.T53;

55 GoldenGate Mappings Column Level Mappings require a definition generated on source and copied to target On the source cd /home/oracle/goldengate ggsci GGSCI 1> EDIT PARAMS defgen1 DEFSFILE ./dirdef/defgen1.def USERID us03 PASSWORD us03 TABLE us03.t54; Generate the definitions using cd /home/oracle/goldengate ./defgen paramfile /home/oracle/goldengate/dirprm/defgen1.prm Copy $GG_HOME/dirdef/defgen1.def to same location on target

56 GoldenGate Mappings Configure replicat parameters
REPLICAT rep1 USERID gg01, PASSWORD gg01 SOURCEDEFS ./dirdef/defgen1.def DISCARDFILE /home/oracle/goldengate/discards, PURGE MAP US03.T54 TARGET US01.T55, & COLMAP (col1=c1, col3=c2, col4=c3, col2=c4); Note – COLMAP syntax is <TargetColumnName>=<SourceColumnName> Mapping is written to the report file e.g.: MAP resolved (entry US03.T54): MAP "US03"."T54" TARGET US01.T55, COLMAP (col1=c1, col3=c2, col4=c3, col2=c4); Using the following key columns for target table US01.T55: COL1.

57 GoldenGate Integrated Capture
Requires Oracle or above Bundle patch Uses additional memory in streams pool May need to increase MEMORY_TARGET parameter STREAMS_POOL parameter Size of /dev/shm (specified in /etc/fstab) To avoid warnings SQL> ALTER SYSTEM SET compatible = ' ' SCOPE=SPFILE; SQL> STARTUP FORCE;

58 GoldenGate Integrated Capture
Grant administrative privileges to GGSCHEMA BEGIN dbms_goldengate_auth.grant_admin_privilege ( grantee => 'GG01', privilege_type => 'CAPTURE', grant_select_privileges => TRUE ); END; / On source server register extract group with database ggsci GGSCI (vm4) 1> DBLOGIN USERID gg01 PASSWORD gg01 Successfully logged into database. GGSCI (vm4) 2> REGISTER EXTRACT ex2 DATABASE :04:01 INFO OGG Extract EX2 successfully registered with database at SCN

59 GoldenGate Integrated Capture
Extract process parameters EXTRACT ex2 USERID gg01, PASSWORD gg01 TRANLOGOPTIONS INTEGRATED PARAMS (MAX_SGA_SIZE 100) EXTTRAIL /home/oracle/goldengate/dirdat/il TABLE us01.t101; Data pump process parameters EXTRACT dp2 USERID gg01, PASSWORD gg01 RMTHOST vm5, MGRPORT 7809 RMTTRAIL /home/oracle/goldengate/dirdat/ir TABLE US01.*; Replicat process parameters REPLICAT rep2 USERID gg01, PASSWORD gg01 ASSUMETARGETDEFS DISCARDFILE /home/oracle/goldengate/discards, PURGE MAP US01.* TARGET US01.*;

60 GoldenGate Integrated Capture
New processes and trails must be added using GGSCI. For example on the source server: ggsci GGSCI> ADD EXTRACT ex2 INTEGRATED TRANLOG, BEGIN NOW GGSCI> ADD EXTTRAIL /home/oracle/goldengate/dirdat/il, EXTRACT ex2 GGSCI> ADD EXTRACT dp2 EXTTRAILSOURCE /home/oracle/goldengate/dirdat/il GGSCI> ADD RMTTRAIL /home/oracle/goldengate/dirdat/ir, EXTRACT dp2 On the target server: ggsci GGSCI> ADD REPLICAT rep2, EXTTRAIL /home/oracle/goldengate/dirdat/ir Start processes in GGSCI

61 Redo Versus Trail

62 Redo versus Trail Single-Row Inserts
TX Header INSERT INTO t2 VALUES (1,’Alpha’); 5.2 DRP Undo Insert Row 1 5.1 11.2 Insert Row 2 5.20 IRP Redo 5.1 10.2 Index Insert INSERT INTO t2 VALUES (2,’Beta’); DRP Undo 5.1 11.2 IRP Redo 5.20 5.1 10.2 COMMIT; 5.4 24.4 Commit

63 Redo versus Trail Multi-Row Inserts
INSERT INTO t2 SELECT * FROM t1; TX Header 5.2 Insert Row 1 QMD Undo 5.1 Insert Row 2 11.3 Insert Row 3 QMI Redo Insert Row 4 Insert Row 5 5.20 5.1 Insert Row 6 Index Insert 10.2 Commit COMMIT; 5.4 24.4

64 Redo versus Trail Direct Inserts
INSERT /*+ APPEND */ INTO t2 SELECT * FROM t1; 5.2 Insert Row 1 5.1 TX Header 5.20 Insert Row 2 24.6 19.1 Insert Row 3 Direct Load Insert Row 4 Insert Row 5 Insert Row 6 5.2 5.1 Index Insert 10.2 Commit COMMIT; 5.4 24.4

65 Redo versus Trail Single-Row Updates
UPDATE t2 SET c2 = ‘Alpha’ WHERE c1 = 1; TX Header 5.2 Update Row 1 URP Undo 5.1 Update Row 2 11.5 URP Redo UPDATE t2 SET c2 = ‘Beta’ WHERE c1 = 2; 5.20 Update Row 3 URP Undo 5.1 11.5 URP Redo UPDATE t2 SET c2 = ‘Gamma’ WHERE c1 = 3; URP Undo 5.1 11.5 5.1 URP Redo Commit COMMIT; 5.4 24.4

66 Redo versus Trail Multi-Row Updates
UPDATE t2 SET c3 = c3 * 1.1; TX Header 5.2 Update Row 1 URP Undo 5.1 Update Row 2 11.5 URP Redo 5.20 Update Row 3 URP Undo 5.1 11.5 URP Redo URP Undo 5.1 11.5 5.1 URP Redo Commit COMMIT; 5.4 24.4

67 Redo versus Trail Single-Row Deletes
TX Header DELETE FROM t2 WHERE c1 = 1; 5.2 Delete Row 1 IRP Undo 5.1 Delete Row 2 11.3 DRP Redo 5.20 Index Undo 5.1 Index Redo 10.2 DELETE FROM t WHERE c1 = 2; IRP Undo 5.1 DRP Redo 5.1 11.3 Index Undo 5.1 Index Redo 10.2 COMMIT; 5.4 24.4 Commit

68 Redo versus Trail Multi-Row Deletes
TX Header DELETE FROM t2; 5.2 Delete Row 1 IRP Undo 5.1 Delete Row 2 11.3 DRP Redo 5.20 Index Undo 5.1 Index Redo 10.2 IRP Undo 5.1 DRP Redo 5.1 11.3 Index Undo 5.1 Index Redo 10.2 COMMIT; 5.4 24.4 Commit

69 Thank You For Your Interest


Download ppt "Understanding GoldenGate"
Ads by Google