Presentation is loading. Please wait.

Presentation is loading. Please wait.

6-Node Active-Active Oracle GoldenGate

Similar presentations


Presentation on theme: "6-Node Active-Active Oracle GoldenGate"— Presentation transcript:

1 6-Node Active-Active Oracle GoldenGate
Experiences and Lessons Learned Luke Davies

2 Why Pythian Recognized Leader: Expertise: Global Reach & Scalability:
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

3 About Luke Davies Team Technical Lead Oracle DBA since V6 (1990)
BSc Microbiology With Pythian since 2008 Main Focus Oracle Core Oracle Performance Tuning

4 6-Node Active-Active Oracle GoldenGate
Set Up

5 Set Up Business requirements Original Solution based on
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 Set Up GoldenGate version 10.4 upgrdaed to 11 for timezone fix
Database version SE then upgraded to EE 3 nodes -> 10 nodes -> 6 nodes Silo stickiness

7 Set Up

8 6-Node Active-Active Oracle GoldenGate
Experiences and Lessons Learned

9 Topics Active/Active considerations General considerations
Supplemental Logging DDL Replication Conflict Avoidance Conflict Detection Release Management Data comparison General considerations Trail file deletion Archive log deletion

10 Supplemental Logging Changes may fail
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

11 Supplemental Logging Drop SL for all named columns Source Tgt
create table repuser2.tbl4 (id number, fname varchar2(100), lname varchar2(100), issued date); :20:57 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: DDL operation included [INCLUDE ALL OBJNAME REPUSER2.*], optype [CREATE], objtype [TABLE], objowner [REPUSER2], objname [TBL4]. :20:57 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Writing DDL operation to extract trail file. :21:03 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully added TRAN DATA for table [REPUSER2.TBL4], operation [ALTER TABLE "REPUSER2"."TBL4" ADD SUPPLEMENTAL LOG GROUP "GGT_61642" ("ID","FNAME","LNAME","ISSUED") ALWAYS /* GOLDENGATE_DDL_REPLICATION */ (size 141)]. :21:04 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully added TRAN DATA for table [REPUSER2.TBL4], operation [ALTER TABLE "REPUSER2"."TBL4" ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS /* GOLDENGATE_DDL_REPLICATION */ (size 103)]. :21:04 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully deleted TRAN DATA for [CREATE] DDL operation, table [REPUSER2.TBL4], operation [ALTER TABLE "REPUSER2"."TBL4" DROP SUPPLEMENTAL LOG GROUP "GGT_61642" /* GOLDENGATE_DDL_REPLICATION */ (size 103)]. select * from dba_log_groups where table_name='TBL4'; OWNER LOG_GROUP_NAME TABLE_NAME LOG_GROUP_TYPE ALWAYS GENERATED REPUSER2 GGS_ TBL USER LOG GROUP ALWAYS USER NAME Drop SL for all named columns

12 Supplemental Logging No SL In Target TBL4 in Target Src Target
:21:05 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL found, operation [create table repuser2.tbl4 (id number, fname varchar2(100), lname varchar2(100), issued date) (size 95)]. :21:05 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL is of mapped scope, after mapping new operation [create table REPUSER2.TBL4 (id number, fname varchar2(100), lname varchar2(100), issued date) (size 95)]. :21:05 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Setting current schema for DDL operation to [SYS]. :21:05 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Executing DDL operation. :21:06 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL operation successful. :21:06 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Restoring current schema for DDL operation to [ggsdb]. desc repuser2.tbl4 Name Null? Type ID NUMBER FNAME VARCHAR2(100) LNAME VARCHAR2(100) ISSUED DATE No SL In Target TBL4 in Target

13 SL for all columns is dropped
Supplemental Logging Source Tgt alter table repuser2.tbl4 add primary key(id); :51:07 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: DDL found, operation [alter table repuser2.tbl4 add primary key(id) (size 47)], start SCN [ ], commit SCN [ ] instance [orcl1123 (1)], DDL seqno [1008], marker seqno [1008]. :51:07 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully added TRAN DATA for table [REPUSER2.TBL4], operation [ALTER TABLE "REPUSER2"."TBL4" ADD SUPPLEMENTAL LOG GROUP "GGT_61642" ("ID") ALWAYS /* GOLDENGATE_DDL_REPLICATION */ (size 116)]. :51:07 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully deleted TRAN DATA for [ALTER] DDL operation, table [REPUSER2.TBL4], operation [ALTER TABLE "REPUSER2"."TBL4" DROP SUPPLEMENTAL LOG DATA (ALL) COLUMNS /* GOLDENGATE_DDL_REPLICATION */ (size 104)]. :51:07 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully added TRAN DATA for table [REPUSER2.TBL4], operation [ALTER TABLE "REPUSER2"."TBL4" ADD SUPPLEMENTAL LOG GROUP "GGS_61642" ("ID") ALWAYS /* GOLDENGATE_DDL_REPLICATION */ (size 116)]. :51:07 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully deleted TRAN DATA for [ALTER] DDL operation, table [REPUSER2.TBL4], operation [ALTER TABLE "REPUSER2"."TBL4" DROP SUPPLEMENTAL LOG GROUP "GGT_61642" /* GOLDENGATE_DDL_REPLICATION */ (size 103)]. select * from dba_log_group_columns where table_name='TBL4'; OWNER LOG_GROUP_NAME TABLE_NAME COLUMN_NAME POSITION LOGGING_PROPERTY REPUSER2 GGS_ TBL ID LOG SL for all columns is dropped SL for ID is added (PK)

14 Supplemental Logging NO SL In Target YET !! Source Target
:51:11 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL found, operation [alter table repuser2.tbl4 add primary key(id) (size 47)]. :51:11 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL is of mapped scope, after mapping new operation [alter table REPUSER2.TBL4 add primary key(id) (size 47)]. :51:11 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Setting current schema for DDL operation to [SYS]. :51:11 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Executing DDL operation. :51:14 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL operation successful. :51:14 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Restoring current schema for DDL operation to [ggsdb]. select * from dba_log_groups where table_name='TBL4'; no rows NO SL In Target YET !!

15 What if we keep running replication this way
Supplemental Logging What if we keep running replication this way T Source Target t1 insert into repuser2.tbl4 values (1,'Test','TestL',sysdate); insert into repuser2.tbl4 values (2,'Test','TestL2',sysdate); insert into repuser2.tbl4 values (3,'Test','TestL3',sysdate); ROWID ID FNAME LNAME ISSUED AAAPDKAAEAAAAIOAAA 1 Test TestL 14/11/12 AAAPDKAAEAAAAIOAAB 2 Test TestL2 14/11/12 AAAPDKAAEAAAAIOAAC 3 Test TestL3 14/11/12 t2

16 What if we keep running replication this way
Supplemental Logging What if we keep running replication this way T Source Target t1 insert into repuser2.tbl4 values (1,'Test','TestL',sysdate); insert into repuser2.tbl4 values (2,'Test','TestL2',sysdate); insert into repuser2.tbl4 values (3,'Test','TestL3',sysdate); ROWID ID FNAME LNAME ISSUED AAAPDKAAEAAAAIOAAA 1 Test TestL 14/11/12 AAAPDKAAEAAAAIOAAB 2 Test TestL2 14/11/12 AAAPDKAAEAAAAIOAAC 3 Test TestL3 14/11/12 ROWID ID FNAME LNAME ISSUED AAAar/AAEAAAE5HAAA 1 Test TestL 14/11/12 AAAar/AAEAAAE5HAAB 2 Test TestL2 14/11/12 AAAar/AAEAAAE5HAAC 3 Test TestL3 14/11/12 t2

17 What if we keep running replication this way
Supplemental Logging What if we keep running replication this way T Source Target t1 insert into repuser2.tbl4 values (1,'Test','TestL',sysdate); insert into repuser2.tbl4 values (2,'Test','TestL2',sysdate); insert into repuser2.tbl4 values (3,'Test','TestL3',sysdate); ROWID ID FNAME LNAME ISSUED AAAPDKAAEAAAAIOAAA 1 Test TestL 14/11/12 AAAPDKAAEAAAAIOAAB 2 Test TestL2 14/11/12 AAAPDKAAEAAAAIOAAC 3 Test TestL3 14/11/12 ROWID ID FNAME LNAME ISSUED AAAar/AAEAAAE5HAAA 1 Test TestL 14/11/12 AAAar/AAEAAAE5HAAB 2 Test TestL2 14/11/12 AAAar/AAEAAAE5HAAC 3 Test TestL3 14/11/12 t2 update repuser2.tbl4 set lname='TestL4' where fname='Test' and rowid='AAAar/AAEAAAE5HAAC‘; AAAar/AAEAAAE5HAAC 3 Test TestL4 14/11/12

18 What if we keep running replication this way
Supplemental Logging What if we keep running replication this way T Source Target t1 insert into repuser2.tbl4 values (1,'Test','TestL',sysdate); insert into repuser2.tbl4 values (2,'Test','TestL2',sysdate); insert into repuser2.tbl4 values (3,'Test','TestL3',sysdate); ROWID ID FNAME LNAME ISSUED AAAPDKAAEAAAAIOAAA 1 Test TestL 14/11/12 AAAPDKAAEAAAAIOAAB 2 Test TestL2 14/11/12 AAAPDKAAEAAAAIOAAC 3 Test TestL3 14/11/12 ROWID ID FNAME LNAME ISSUED AAAar/AAEAAAE5HAAA 1 Test TestL 14/11/12 AAAar/AAEAAAE5HAAB 2 Test TestL2 14/11/12 AAAar/AAEAAAE5HAAC 3 Test TestL3 14/11/12 t2 UPDATE "REPUSER2"."TBL4" SET "LNAME"=:a1 WHERE "ID"=:b0 OCI Error ORA-01403: no data found, SQL <UPDATE "REPUSER2"."TBL4" SET "LNAME" = :a1 WHERE "ID" = :b0> Operation failed at seqno 5 rba 4598 Discarding record on action DISCARD on error 1403 Problem replicating REPUSER2.TBL4 to REPUSER2.TBL4 Record not found Mapping problem with compressed update record (target format)... * ID = LNAME = TestL4 update repuser2.tbl4 set lname='TestL4' where fname='Test' and rowid='AAAar/AAEAAAE5HAAC‘; AAAar/AAEAAAE5HAAC 3 Test TestL4 14/11/12 Missing Value!

19 What if supplemental logging is enabled on target
Source Target t1 insert into repuser2.tbl4 values (1,'Test','TestL',sysdate); insert into repuser2.tbl4 values (2,'Test','TestL2',sysdate); insert into repuser2.tbl4 values (3,'Test','TestL3',sysdate); ROWID ID FNAME LNAME ISSUED AAAPDKAAEAAAAIOAAA 1 Test TestL 14/11/12 AAAPDKAAEAAAAIOAAB 2 Test TestL2 14/11/12 AAAPDKAAEAAAAIOAAC 3 Test TestL3 14/11/12 t2

20 What if supplemental logging is enabled on target
Source Target t1 insert into repuser2.tbl4 values (1,'Test','TestL',sysdate); insert into repuser2.tbl4 values (2,'Test','TestL2',sysdate); insert into repuser2.tbl4 values (3,'Test','TestL3',sysdate); ROWID ID FNAME LNAME ISSUED AAAPDKAAEAAAAIOAAA 1 Test TestL 14/11/12 AAAPDKAAEAAAAIOAAB 2 Test TestL2 14/11/12 AAAPDKAAEAAAAIOAAC 3 Test TestL3 14/11/12 add trandata repuser2.tbl4 ROWID ID FNAME LNAME ISSUED AAAar/AAEAAAE5HAAA 1 Test TestL 14/11/12 AAAar/AAEAAAE5HAAB 2 Test TestL2 14/11/12 AAAar/AAEAAAE5HAAC 3 Test TestL3 14/11/12 t2

21 What if supplemental logging is enabled on target
Source Target t1 insert into repuser2.tbl4 values (1,'Test','TestL',sysdate); insert into repuser2.tbl4 values (2,'Test','TestL2',sysdate); insert into repuser2.tbl4 values (3,'Test','TestL3',sysdate); ROWID ID FNAME LNAME ISSUED AAAPDKAAEAAAAIOAAA 1 Test TestL 14/11/12 AAAPDKAAEAAAAIOAAB 2 Test TestL2 14/11/12 AAAPDKAAEAAAAIOAAC 3 Test TestL3 14/11/12 add trandata repuser2.tbl4 ROWID ID FNAME LNAME ISSUED AAAar/AAEAAAE5HAAA 1 Test TestL 14/11/12 AAAar/AAEAAAE5HAAB 2 Test TestL2 14/11/12 AAAar/AAEAAAE5HAAC 3 Test TestL3 14/11/12 t2 update repuser2.tbl4 set lname='TestLB' where fname='Test' and rowid='AAAar/AAEAAAE5HAAC‘; AAAar/AAEAAAE5HAAC 3 Test TestLB 14/11/12

22 What if supplemental logging is enabled on target
Source Target t1 insert into repuser2.tbl4 values (1,'Test','TestL',sysdate); insert into repuser2.tbl4 values (2,'Test','TestL2',sysdate); insert into repuser2.tbl4 values (3,'Test','TestL3',sysdate); ROWID ID FNAME LNAME ISSUED AAAPDKAAEAAAAIOAAA 1 Test TestL 14/11/12 AAAPDKAAEAAAAIOAAB 2 Test TestL2 14/11/12 AAAPDKAAEAAAAIOAAC 3 Test TestL3 14/11/12 add trandata repuser2.tbl4 ROWID ID FNAME LNAME ISSUED AAAar/AAEAAAE5HAAA 1 Test TestL 14/11/12 AAAar/AAEAAAE5HAAB 2 Test TestL2 14/11/12 AAAar/AAEAAAE5HAAC 3 Test TestL3 14/11/12 t2 UPDATE "REPUSER2"."TBL4" SET "LNAME"=:a1 WHERE "ID"=:b0 a1 : TestLB b0 : 3 AAAPDKAAEAAAAIOAAC 3 Test TestLB 14/11/12 update repuser2.tbl4 set lname='TestLB' where fname='Test' and rowid='AAAar/AAEAAAE5HAAC‘; AAAar/AAEAAAE5HAAC 3 Test TestLB 14/11/12

23 What if supplemental logging is enabled on DB level
Source Target t1 insert into repuser2.tbl4 values (1,'Test','TestL',sysdate); insert into repuser2.tbl4 values (2,'Test','TestL2',sysdate); insert into repuser2.tbl4 values (3,'Test','TestL3',sysdate); ROWID ID FNAME LNAME ISSUED AAAPDKAAEAAAAIOAAA 1 Test TestL 14/11/12 AAAPDKAAEAAAAIOAAB 2 Test TestL2 14/11/12 AAAPDKAAEAAAAIOAAC 3 Test TestL3 14/11/12 t2

24 What if supplemental logging is enabled on DB level
Source Target t1 insert into repuser2.tbl4 values (1,'Test','TestL',sysdate); insert into repuser2.tbl4 values (2,'Test','TestL2',sysdate); insert into repuser2.tbl4 values (3,'Test','TestL3',sysdate); ROWID ID FNAME LNAME ISSUED AAAPDKAAEAAAAIOAAA 1 Test TestL 14/11/12 AAAPDKAAEAAAAIOAAB 2 Test TestL2 14/11/12 AAAPDKAAEAAAAIOAAC 3 Test TestL3 14/11/12 delete trandata repuser2.tbl4 alter database add supplemental log data (primary key) columns; alter system switch logfile; ROWID ID FNAME LNAME ISSUED AAAar/AAEAAAE5HAAA 1 Test TestL 14/11/12 AAAar/AAEAAAE5HAAB 2 Test TestL2 14/11/12 AAAar/AAEAAAE5HAAC 3 Test TestL3 14/11/12 t2

25 What if supplemental logging is enabled on DB level
Source Target t1 insert into repuser2.tbl4 values (1,'Test','TestL',sysdate); insert into repuser2.tbl4 values (2,'Test','TestL2',sysdate); insert into repuser2.tbl4 values (3,'Test','TestL3',sysdate); ROWID ID FNAME LNAME ISSUED AAAPDKAAEAAAAIOAAA 1 Test TestL 14/11/12 AAAPDKAAEAAAAIOAAB 2 Test TestL2 14/11/12 AAAPDKAAEAAAAIOAAC 3 Test TestL3 14/11/12 delete trandata repuser2.tbl4 alter database add supplemental log data (primary key) columns; alter system switch logfile; ROWID ID FNAME LNAME ISSUED AAAar/AAEAAAE5HAAA 1 Test TestL 14/11/12 AAAar/AAEAAAE5HAAB 2 Test TestL2 14/11/12 AAAar/AAEAAAE5HAAC 3 Test TestL3 14/11/12 t2 update repuser2.tbl4 set lname='TestLC’ where fname='Test' and rowid=‘AAAar/AAEAAAE5HAAC’; ROWID ID FNAME LNAME ISSUED AAAar/AAEAAAE5HAAA 1 Test TestL 14/11/12 AAAar/AAEAAAE5HAAB 2 Test TestL2 14/11/12 AAAar/AAEAAAE5HAAC 3 Test TestLC 14/11/12

26 What if supplemental logging is enabled on DB level
Source Target t1 insert into repuser2.tbl4 values (1,'Test','TestL',sysdate); insert into repuser2.tbl4 values (2,'Test','TestL2',sysdate); insert into repuser2.tbl4 values (3,'Test','TestL3',sysdate); ROWID ID FNAME LNAME ISSUED AAAPDKAAEAAAAIOAAA 1 Test TestL 14/11/12 AAAPDKAAEAAAAIOAAB 2 Test TestL2 14/11/12 AAAPDKAAEAAAAIOAAC 3 Test TestL3 14/11/12 delete trandata repuser2.tbl4 alter database add supplemental log data (primary key) columns; alter system switch logfile; ROWID ID FNAME LNAME ISSUED AAAar/AAEAAAE5HAAA 1 Test TestL 14/11/12 AAAar/AAEAAAE5HAAB 2 Test TestL2 14/11/12 AAAar/AAEAAAE5HAAC 3 Test TestL3 14/11/12 t2 UPDATE "REPUSER2"."TBL4" SET "LNAME"=:a1 WHERE "ID"=:b0 a1 : TestLC b0 : 3 AAAPDKAAEAAAAIOAAC 3 Test TestLC 14/11/12 update repuser2.tbl4 set lname='TestLC’ where fname='Test' and rowid=‘AAAar/AAEAAAE5HAAC’; ROWID ID FNAME LNAME ISSUED AAAar/AAEAAAE5HAAA 1 Test TestL 14/11/12 AAAar/AAEAAAE5HAAB 2 Test TestL2 14/11/12 AAAar/AAEAAAE5HAAC 3 Test TestLC 14/11/12

27 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

28 To replicat add SL to target
Supplemental Logging PK UK Existing object KEYCOLs Supplemental logging ALL New object DDLOPTIONS & ADDTRANDATA & GETREPLICATES & REPORT To add SL to source DB If you don’t have DDL replication then need to add supplemental logging If you do then you have some DDL OPTIONS To replicat add SL to target

29 Supplemental Logging Time Source t1
create table repuser2.tbl11 (id number, name varchar2(10)); :58:58 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: DDL found, operation [create table repuser2.tbl11 (id number, name varchar2(10)) :58:59 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully added TRAN DATA for table [REPUSER2.TBL11], operation [ALTER TABLE "REPUSER2"."TBL11" ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS /* GOLDENGATE_DDL_REPLICATION */ (size 104)]. t2

30 Supplemental Logging Time Source t1
create table repuser2.tbl11 (id number, name varchar2(10)); :58:58 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: DDL found, operation [create table repuser2.tbl11 (id number, name varchar2(10)) :58:59 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully added TRAN DATA for table [REPUSER2.TBL11], operation [ALTER TABLE "REPUSER2"."TBL11" ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS /* GOLDENGATE_DDL_REPLICATION */ (size 104)]. t2 alter table repuser2.tbl11 add primary key (id); :00:04 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: DDL found, operation [alter table repuser2.tbl11 add primary key (id) ( :00:04 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully added TRAN DATA for table [REPUSER2.TBL11], operation [ALTER TABLE "REPUSER2"."TBL11" ADD SUPPLEMENTAL LOG GROUP "GGT_61549" ("ID") ALWAYS /* GOLDENGATE_DDL_REPLICATION */ (size 117)]. :00:04 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully deleted TRAN DATA for [ALTER] DDL operation, table [REPUSER2.TBL11], operation [ALTER TABLE "REPUSER2"."TBL11" DROP SUPPLEMENTAL LOG DATA (ALL) COLUMNS /* GOLDENGATE_DDL_REPLICATION */ (size 105)]. :00:04 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully added TRAN DATA for table [REPUSER2.TBL11], operation [ALTER TABLE "REPUSER2"."TBL11" ADD SUPPLEMENTAL LOG GROUP "GGS_61549" ("ID") ALWAYS /* GOLDENGATE_DDL_REPLICATION */ (size 117)]. :00:04 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully deleted TRAN DATA for [ALTER] DDL operation, table [REPUSER2.TBL11], operation [ALTER TABLE "REPUSER2"."TBL11" DROP SUPPLEMENTAL LOG GROUP "GGT_61549" /* GOLDENGATE_DDL_REPLICATION */ (size 104)].

31 Supplemental Logging No SL operations Source Target
:51:11 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL found, operation [alter table repuser2.tbl11 add primary key(id) (size 47)]. :51:11 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL is of mapped scope, after mapping new operation [alter table REPUSER2.TBL11 add primary key(id) (size 47)]. :51:11 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Setting current schema for DDL operation to [SYS]. :51:11 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Executing DDL operation. :51:14 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL operation successful. :51:14 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Restoring current schema for DDL operation to [ggadmin]. No SL operations

32 Supplemental Logging No SL operations Source Target
:51:11 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL found, operation [alter table repuser2.tbl11 add primary key(id) (size 47)]. :51:11 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL is of mapped scope, after mapping new operation [alter table REPUSER2.TBL11 add primary key(id) (size 47)]. :51:11 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Setting current schema for DDL operation to [SYS]. :51:11 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Executing DDL operation. :51:14 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL operation successful. :51:14 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Restoring current schema for DDL operation to [ggadmin]. select * from dba_log_groups where table_name='TBL11'; no rows No SL operations

33 Supplemental Logging Problem documented in MOS “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

34 Supplemental Logging Time Source t1
create table repuser2.tbl11 (id number, name varchar2(10)); :58:58 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: DDL found, operation [create table repuser2.tbl11 (id number, name varchar2(10)) :58:59 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully added TRAN DATA for table [REPUSER2.TBL11], operation [ALTER TABLE "REPUSER2"."TBL11" ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS /* GOLDENGATE_DDL_REPLICATION */ (size 104)]. t2 alter table repuser2.tbl11 add primary key (id); :00:04 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: DDL found, operation [alter table repuser2.tbl11 add primary key (id) ( :00:04 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully added TRAN DATA for table [REPUSER2.TBL11], operation [ALTER TABLE "REPUSER2"."TBL11" ADD SUPPLEMENTAL LOG GROUP "GGT_61549" ("ID") ALWAYS /* GOLDENGATE_DDL_REPLICATION */ (size 117)]. :00:04 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully deleted TRAN DATA for [ALTER] DDL operation, table [REPUSER2.TBL11], operation [ALTER TABLE "REPUSER2"."TBL11" DROP SUPPLEMENTAL LOG DATA (ALL) COLUMNS /* GOLDENGATE_DDL_REPLICATION */ (size 105)]. :00:04 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully added TRAN DATA for table [REPUSER2.TBL11], operation [ALTER TABLE "REPUSER2"."TBL11" ADD SUPPLEMENTAL LOG GROUP "GGS_61549" ("ID") ALWAYS /* GOLDENGATE_DDL_REPLICATION */ (size 117)]. :00:04 INFO OGG Oracle GoldenGate Capture for Oracle, ext_nb.prm: Successfully deleted TRAN DATA for [ALTER] DDL operation, table [REPUSER2.TBL11], operation [ALTER TABLE "REPUSER2"."TBL11" DROP SUPPLEMENTAL LOG GROUP "GGT_61549" /* GOLDENGATE_DDL_REPLICATION */ (size 104)].

35 GETREPLICATES does not work as it is expected
Supplemental Logging Time Target t1,t2 :59:01 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL is of mapped scope, after mapping new operation [create table REPUSER2."TBL11" (id number, name varchar2(10)) (size 62)]. :00:06 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL found, operation [alter table repuser2.tbl11 add primary key (id) (size 49)]. :02:53 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL found, operation [ALTER TABLE "REPUSER2"."TBL11" ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS (size 72)]. :02:53 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL operation successful. :03:27 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL found, operation [ALTER TABLE "REPUSER2"."TBL11" ADD SUPPLEMENTAL LOG GROUP "GGT_61549" ("ID") ALWAYS (size 85)]. :03:27 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL operation successful. :04:59 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL found, operation [ALTER TABLE "REPUSER2"."TBL11" DROP SUPPLEMENTAL LOG GROUP "GGT_61549" (size 72)]. :04:59 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: DDL operation successful. :04:59 INFO OGG Oracle GoldenGate Delivery for Oracle, rena_nb.prm: Restoring current schema for DDL operation to [ggsdb]. GETREPLICATES does not work as it is expected

36 Supplemental Logging ADDTRANDATA on source for new object.
Time Source t1 Create table t2 ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS t3 Create PK index t4 add supplemental log data (id) (temp) t5 drop SUPPLEMENTAL LOG DATA (ALL) T6 add supplemental log data (id) T7 drop supplemental log data (id) (temp) Time Target t1 Create table t2 Create PK index t3 ADD SUPPLEMENTAL LOG DATA (ALL) COLUMNS t4 add supplemental log data (id) (temp) t5 drop supplemental log data (id) (temp) ADDTRANDATA on source for new object. Monitor replicated object on target and add SL manually before any DML change

37 Supplemental Logging SCHEMATRANDATA In GoldenGate 11.1
OGG 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 Cannot verify existence of table function that is required to enable schema [MOS ] To use SCHEMATRANDATA, please apply the fix in bug Only on some platforms

38 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 Mention -> May set database PK logging but it is at a cost of the whole database but it would catch all new tables

39 Topics Active/Active considerations General considerations
Supplemental Logging DDL Replication Conflict Avoidance Conflict Detection Release Management Data comparison General considerations Trail file deletion Archive log deletion

40 DDL Replication Time Source Target T1 T2 create table luke ( a number
,b date ,c varchar2(30) ); alter table luke add primary key ( a ); T2

41 DDL Replication Time Source Target T1 T2 create table luke ( a number
,b date ,c varchar2(30) ); alter table luke add primary key ( a ); desc luke Name Null? Type A NUMBER B DATE C VARCHAR2(30) add trandata luke T2

42 DDL Replication Time Source Target T1 T2 create table luke ( a number
,b date ,c varchar2(30) ); alter table luke add primary key ( a ); desc luke Name Null? Type A NUMBER B DATE C VARCHAR2(30) add trandata luke T2 insert into luke values ( 1, sysdate, 'Luke Test 1' );

43 DDL Replication Time Source Target T1 T2 create table luke ( a number
,b date ,c varchar2(30) ); alter table luke add primary key ( a ); desc luke Name Null? Type A NUMBER B DATE C VARCHAR2(30) add trandata luke T2 insert into luke values ( 1, sysdate, 'Luke Test 1' ); select * from luke; A B C 1 19-NOV-12 Luke Test 1 ( 2, sysdate, 'Luke Test 2' );

44 DDL Replication Time Source Target T3 T4 select * from luke; A B C
2 19-NOV-12 Luke Test 2 1 19-NOV-12 Luke Test 1 update luke set c = 'Luke Test 1 updated' where a = 1; T4

45 DDL Replication Time Source Target T3 T4 select * from luke; A B C
2 19-NOV-12 Luke Test 2 1 19-NOV-12 Luke Test 1 update luke set c = 'Luke Test 1 updated' where a = 1; 1 19-NOV-12 Luke Test 1 updated c = 'Luke Test 2 updated' where a = 2; T4

46 DDL Replication Time Source Target T3 T4 alter table luke add
select * from luke; A B C 2 19-NOV-12 Luke Test 2 1 19-NOV-12 Luke Test 1 update luke set c = 'Luke Test 1 updated' where a = 1; 1 19-NOV-12 Luke Test 1 updated c = 'Luke Test 2 updated' where a = 2; T4 2 19-NOV-12 Luke Test 2 updated alter table luke add ( d timestamp );

47 DDL Replication Time Source Target T3 T4 alter table luke add
select * from luke; A B C 2 19-NOV-12 Luke Test 2 1 19-NOV-12 Luke Test 1 update luke set c = 'Luke Test 1 updated' where a = 1; 1 19-NOV-12 Luke Test 1 updated c = 'Luke Test 2 updated' where a = 2; T4 2 19-NOV-12 Luke Test 2 updated alter table luke add ( d timestamp ); desc luke Name Null? Type A NUMBER B DATE C VARCHAR2(30) D TIMESTAMP(6)

48 DDL Replication Time Source Target T5 T6 insert into luke values
( 3, sysdate, 'Luke Test 3', systimestamp ); T6

49 DDL Replication Time Source Target T5 T6 insert into luke values
( 3, sysdate, 'Luke Test 3', systimestamp ); select a,d from luke; A D 2 3 22-NOV AM 1 ( 4, sysdate, 'Luke Test 4', T6

50 DDL Replication Missing Value! Time Source Target T5 T6
insert into luke values ( 3, sysdate, 'Luke Test 3', systimestamp ); select a,d from luke; A D 2 3 22-NOV AM 1 ( 4, sysdate, 'Luke Test 4', T6 4 Missing Value!

51 DDL Replication Time Source Target T5 T6 insert into luke values
( 3, sysdate, 'Luke Test 3', systimestamp ); select a,d from luke; A D 2 3 22-NOV AM 1 ( 4, sysdate, 'Luke Test 4', T6 4 <<<*** MISSING ***>>> Stop extract Start extract ( 5, sysdate, 'Luke Test 5',

52 Supplemental Logging Source Discard -> Process Abending : :53:07 Source Context : SourceModule : [ggstd.conv.endian] SourceID : [/scratch/pradshar/view_storage/pradshar_bugdbrh40_ /oggcore/OpenSys/src/gglib/ggstd/lecnv.c] SourceFunction : [convCompSQL] SourceLine : [530] ThreadBacktrace : [9] elements : [/ggs/replicat(CMessageContext::AddThreadContext()+0x26) [0x5f1e56]] : [/ggs/replicat(CMessageFactory::CreateMessage(CSourceContext*, unsigned int, ...)+0x7b2) [0x5e88f2]] : [/ggs/replicat(_MSG_ERR_MAP_COL_INDEX_INVALID(CSourceContext*, DBString<777> const&, int, int, CMessageFactory::MessageDisposition)+0xa6) [0x5bee16]] : [/ggs/replicat [0x900e6c]] : [/ggs/replicat(ggConvRecLE(char*, file_def*, int, char, char)+0x6c) [0x900fac]] : [/ggs/replicat [0x8f4d6e]] : [/ggs/replicat(main+0x84b) [0x507a0b]] : [/lib64/libc.so.6(__libc_start_main+0xf4) [0x34cd81d994]] : [/ggs/replicat(__gxx_personality_v0+0x1e2) [0x4e3ffa]] :53:07 ERROR OGG Bad column index (3) specified for table FEXLINK.LUKE, max columns = 3.

53 DDL Replication GoldenGate parameters (Replicat only) Time Source
Target T7 Restart replicat select a,d from luke; A D 3 22-NOV AM 2 4 5 22-NOV AM 1 Note that we also need GETREPLICATES on the primary extract GoldenGate parameters (Replicat only) DDLOPTIONS UPDATEMETADATA Automatically updates GoldenGate metadata cache

54 DDL Replication UPDATEMETADATA doesn’t work both ways
After DDL ALTER must bounce REPLICAT on the local node and PRIMARY EXTRACT on other nodes Tested on 10gR2 and GG – it may work on other version combinations

55 Topics Active/Active considerations General considerations
Supplemental Logging DDL Replication Conflict Avoidance Conflict Detection Release Management Data comparison General considerations Trail file deletion Archive log deletion

56 Conflict Avoidance 2 Columns Trigger LAST_UPDATED_AT (DATE)
LAST_UPDATING_BY (VARCHAR2(30)) Trigger CREATE OR REPLACE TRIGGER <Owner>.<Table Name>_BIU BEFORE INSERT OR UPDATE ON <Owner>.<Table Name> FOR EACH ROW WHEN ( user != 'GGADMIN' ) DECLARE l_username VARCHAR2(50); BEGIN SELECT NVL(SYS_CONTEXT('USERENV','CLIENT_IDENTIFIER'),USER) INTO l_username FROM DUAL; :NEW.last_updated_at := SYSDATE; :NEW.last_updating_user := l_username; END; / So on replication the replicat does not update the actual values coming from the original request WHEN is compile time IF in body of trigger is runtime – so doesn’t fire for each replicated row.

57 Conflict Avoidance Sequences 16 digit sequence number
Each silo has a unique 2 digit starting number e.g. 21, 31 etc Ability to find originating silo for management reports Guarantee uniqueness Extra maintenance for new sequences Need GG parameter DDL EXCLUDE OBJTYPE SEQUENCE Not use GG sequence replication as there is possibility of conflict

58 Topics Active/Active considerations General considerations
Supplemental Logging DDL Replication Conflict Avoidance Conflict Detection Release Management Data comparison General considerations Trail file deletion Archive log deletion

59 Conflict Detection Discards Check discard files
Use a cron script or other scheduler for every 5 mins Discard reader built in PL/SQL PIPELINE function Parses the discard file for common errors Condenses the output to one line with the main error information Check blog for source code

60 Conflict Detection Discards Usage of READ_DISCARD
The discard had 567 lines READ_DISCARD reduced output to 6 lines select LINE_NUMBER , ORACLE_ERROR , SOURCE_OBJECT_NAME , ERROR_OPERATION , ERROR_COLUMN , ERROR_VALUE , PK_TABLE_NAME from table(read_discard(‘repname’)); LINE_NUMBER ORA_ERROR SOURCE_OBJECT_NAME ERROR_OPERATION ERROR_COLUMN ERROR_VALUE PK_TABLE_NAME 1 ORA CHILD_TABLE INSERT PARENT_ID PARENT 44 ORA CHILD_TABLE INSERT CHILD1_ID CHILD_TABLE1 63 ORA CHILD_TABLE INSERT PARENT_ID PARENT 263 ORA TABLE UPDATE TABLE1_ID 311 ORA PARENT UPDATE PARENT_ID 392 ORA CHILD_TABLE UPDATE CHILD3_ID 6 rows selected.

61 Topics Active/Active considerations General considerations
Supplemental Logging DDL Replication Conflict Avoidance Conflict Detection Release Management Data comparison General considerations Trail file deletion Archive log deletion

62 Release Management App code Pre-DDL Major Release script DB change DDL DML Post-DDL Pre-DDL Post-DDL DDL DML Statements which can not be replicated OR We do not want to be replicated Run these statements outside replication cycle CREATE SEQUENCE CREATE/ALTER MATERIALIZED VIEW CREATE SYNONYM on other user Due to GG limitations For the first time ever – adding 110 agents to their POS system. Countries joining the system, outside currently running in NA…. Needed a solution that was scalable, proven, robust, OGG, is around for a while, the clear choice to replace their old architecture using Message queueing in Oracle database 10g. Statements which are replicated via GoldenGate

63 Challenge – Replication from superset
Release Management Challenge – Replication from superset structure to minor set Version N Version N+1 ERROR OGG Oracle GoldenGate Delivery for Oracle, resb01sa.prm: Bad column index (nn) specified for table mytab, max columns = 59. ERROR OGG Oracle GoldenGate Delivery for Oracle, resb01sa.prm: PROCESS ABENDING.

64 Release Management Drop Column t1 t2 t3 t4 T Source Target desc mytab
ID not null number Name varchar2(10) ID not null number Name varchar2(10) t2 t3 t4

65 Release Management Drop Column t1 t2 t3 t4 T Source Target desc mytab
ID not null number Name varchar2(10) ID not null number Name varchar2(10) t2 alter table mytab drop column name; t3 t4

66 Release Management Drop Column t1 t2 t3 t4 T Source Target desc mytab
ID not null number Name varchar2(10) ID not null number Name varchar2(10) t2 alter table mytab drop column name; Generate defgen and copy to source ./defgen paramfile ./dirprm/defgen.prm insert into mytab values(1,’Test01’); t3 t4

67 Release Management Drop Column t1 t2 t3 t4 T Source Target desc mytab
ID not null number Name varchar2(10) ID not null number Name varchar2(10) t2 alter table mytab drop column name; Generate defgen and copy to source ./defgen paramfile ./dirprm/defgen.prm insert into mytab values(1,’Test01’); t3 -- ASSUMETARGETDEFS SOURCEDEFS ./dirsql/targetdefgen.sql MAP mytab, TARGET mytab, COLMAP ( ID=ID ); start replicat t4

68 Release Management Drop Column t1 t2 t3 t4 T Source Target desc mytab
ID not null number Name varchar2(10) ID not null number Name varchar2(10) t2 alter table mytab drop column name; Generate defgen and copy to source ./defgen paramfile ./dirprm/defgen.prm insert into mytab values(1,’Test01’); t3 -- ASSUMETARGETDEFS SOURCEDEFS ./dirsql/targetdefgen.sql MAP mytab, TARGET mytab, COLMAP ( ID=ID ); start replicat start pump extract t4

69 Release Management Drop Column t1 t2 t3 t4 T Source Target desc mytab
ID not null number Name varchar2(10) ID not null number Name varchar2(10) t2 alter table mytab drop column name; Generate defgen and copy to source ./defgen paramfile ./dirprm/defgen.prm insert into mytab values(1,’Test01’); t3 -- ASSUMETARGETDEFS SOURCEDEFS ./dirsql/targetdefgen.sql MAP mytab, TARGET mytab, COLMAP ( ID=ID ); start replicat start pump extract t4 select * from mytab ID 1 Select * from mytab ID NAME 1 Test01

70 Release Management Modify Column t1 t2 t3 t4 T Source Target
desc mytab ID not null number Name varchar2(10) ID not null number Name varchar2(10) t2 t3 t4

71 Release Management Modify Column t1 t2 t3 t4 T Source Target
desc mytab ID not null number Name varchar2(10) ID not null number Name varchar2(10) t2 alter table mytab modify column name (varchar2(6)); t3 t4

72 Release Management Modify Column t1 t2 t3 t4 T Source Target
desc mytab ID not null number Name varchar2(10) ID not null number Name varchar2(10) t2 alter table mytab modify column name (varchar2(6)); Generate defgen and copy to source ./defgen paramfile ./dirprm/defgen.prm insert into mytab values(1,’Test011’); t3 t4

73 Release Management Modify Column t1 t2 t3 t4 T Source Target
desc mytab ID not null number Name varchar2(10) ID not null number Name varchar2(10) t2 alter table mytab modify column name (varchar2(6)); Generate defgen and copy to source ./defgen paramfile ./dirprm/defgen.prm insert into mytab values(1,’Test011’); t3 -- ASSUMETARGETDEFS SOURCEDEFS ./dirsql/targetdefgen.sql MAP mytab, TARGET mytab, COLMAP ( USEDEFAULTS, ); start replicat t4

74 Release Management Modify Column t1 t2 t3 t4 T Source Target
desc mytab ID not null number Name varchar2(10) ID not null number Name varchar2(10) t2 alter table mytab modify column name (varchar2(6)); Generate defgen and copy to source ./defgen paramfile ./dirprm/defgen.prm insert into mytab values(1,’Test011’); t3 -- ASSUMETARGETDEFS SOURCEDEFS ./dirsql/targetdefgen.sql MAP mytab, TARGET mytab, COLMAP ( USEDEFAULTS, ); start replicat start pump extract t4

75 Release Management Modify Column t1 t2 t3 t4 T Source Target
desc mytab ID not null number Name varchar2(10) ID not null number Name varchar2(10) t2 alter table mytab modify column name (varchar2(6)); Generate defgen and copy to source ./defgen paramfile ./dirprm/defgen.prm insert into mytab values(1,’Test011’); t3 -- ASSUMETARGETDEFS SOURCEDEFS ./dirsql/targetdefgen.sql MAP mytab, TARGET mytab, COLMAP ( USEDEFAULTS, ); start replicat start pump extract t4 Select * from mytab ID NAME 1 Test01 1 Test011

76 Release Management ASSUMETARGETDEFS SOURCEDEFS & MAP Old Version: Create metadata for New Version DB ( defgen ) New Version: Use SOURCEDEFS & MAP for pulling data from superset structure ASSUMETARGETDEFS – Identical column name , identical data type , identical column order

77 Topics Active/Active considerations General considerations
Supplemental Logging DDL Replication Conflict Avoidance Conflict Detection Release Management Data comparison General considerations Trail file deletion Archive log deletion

78 Data Comparison User developed scripts
Master shell scripts calls PL/SQL package Compares VARCHAR2, NUMBER, DATE and TIMESTAMP Large VARCHAR2, BLOB, CLOB fields are hashed for comparison Requires a database link Uses LAST_UPDATED_AT timestamps to compare a subset of each table e.g. SYSDATE – 7 Saves the ID of the offending row in a custom table Inconsistencies are handled manually Can be time consuming Mention logic to identify transient rows and real problems

79 Data Comparison Veridata
Need to set up a server with a database component Each database in the replication cluster needs an agent There can be significant initial configuration for tables to excluded columns, if necessary. Hashes the entire row for less network traffic All comparison is done on the veridata server Reports are good and clear Need to write an XML parser to create the insert / update / delete statements May need some clean up operations for report files on the server

80 Topics Active/Active considerations General considerations
Supplemental Logging DDL Replication Conflict Avoidance Conflict Detection Release Management Data comparison General considerations Trail file deletion Archive log deletion

81 Use unique trail file names
Trail file deletion PURGEOLDEXTRACTS in mgr.prm PURGEOLDEXTRACTS ./dirdat/*, USECHECKPOINTS, MINKEEPDAYS 6 Problems can occur if trail files have the same name (MOS ) Best practice use unique trail file names (MOS ) Use unique trail file names Use a script to check primary extracts, datapumps and replicats Script links Primary Extract -> DataPump(s) -> Replicat Only delete once have been used by the next level Used by Replicat if you want to be really safe Parsing output from -> info <ER Name>, showch

82 Trail file deletion Info extract, showch output Read Checkpoint #1
GGS Log Trail Startup Checkpoint (starting position in the data source): Sequence #: 8 RBA: 1139 Timestamp: :57: Extract Trail: ./dirdat/wb Current Checkpoint (position of last record read in the data source): Sequence #: 11 Timestamp: :51: Write Checkpoint #1 Current Checkpoint (current write position): Sequence #: 9 RBA: 5099 Timestamp: :17:

83 Topics Active/Active considerations General considerations
Supplemental Logging DDL Replication Conflict Avoidance Conflict Detection Release Management Data comparison General considerations Trail file deletion Archive log deletion

84 Archive Log Deletion GoldenGate only sends transaction on commit
Need to keep archive logs until transaction completes Either user a script for archive log deletion Or since can register the extract (EE only) REGISTER EXTRACT <Extract Name> LOGRETENTION DBA_CAPTURE -> OGG2$_EXT01UPL88C29FC8 Get RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process Beware of bugs! (MOS ) Only need to keep archive logs if the goldengate crashes so that it can start again at the right point

85 Lessons Learned Supplemental Logging is critical - get it right!
Structural changes need to be managed carefully Parts of the database structure needs special attention Sequences, Materialized Views, Extra columns Need to set up monitoring Discards Row comparison GG processes and function Trail files need to be cleaned up Archive log cleanup must be integrated with GG

86 Thank you and Q&A To contact us… To follow us… sales@pythian.com
@pythian @pythianjobs


Download ppt "6-Node Active-Active Oracle GoldenGate"

Similar presentations


Ads by Google