DOYENSYS Knowledge Portal




We Welcome you to visit our DOYENSYS KNOWLEDGE PORTAL : Doyensys Knowledge Portal




Tuesday, March 20, 2018

Increasing Performance by Splitting Replication Loads on Goldengate

Steps for performing - Increasing Performance by Splitting Replication Loads 

On Source

[oracle@ggsource.doyensys.com sqlscripts]$ echo $ORACLE_SID
ggsource

[oracle@ggsource.doyensys.com sqlscripts]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Mon Jan 17 04:25:55 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing opt ions

SQL> connect user1/user1
Connected.
SQL> @range_split.sql
DROP TABLE range_split
*
ERROR at line 1:
ORA-00942: table or view does not exist
Table created.

SQL> @populate_range_split.sql
Procedure created.

GGSCI (ggsource.doyensys.com) 2> dblogin useridalias ggsource
Successfully logged into database.

GGSCI (ggsource.doyensys.com) 3> add trandata user1.range_split
Logging of supplemental redo data enabled for table user1.RANGE_SPLIT.
TRANDATA for scheduling columns has been added on table 'user1.RANGE_SPLIT '.

GGSCI (ggsource.doyensys.com) 4> info trandata user1.r*
Logging of supplemental redo log data is enabled for table user1.RANGE_SPL IT.
Columns supplementally logged for table user1.RANGE_SPLIT: ROW_ID.

GGSCI (ggsource.doyensys.com) 1> edit params defsrc
DefsFile /u01/app/source/dirdef/rangesplit.def, Purge
UserIDAlias ggsource
Table user1.RANGE_SPLIT;

[oracle@ggsource.doyensys.com source]$ ./defgen paramfile /u01/app/source/dirprm/defsrc.prm
***********************************************************************
** Running with the following parameters **
***********************************************************************
DefsFile /u01/app/source/dirdef/rangesplit.def, Purge
UserIDAlias ggsource
Table user1.RANGE_SPLIT;
Retrieving definition for user1.RANGE_SPLIT.
Definitions generated for 1 table in /u01/app/source/dirdef/rangesplit.def.

[oracle@ggsource.doyensys.com dirdef]$ cp rangesplit.def /u01/app/target/dirdef/

On Target

[oracle@ggtarget.doyensys.com sqlscripts]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.2.0 Production on Mon Jan 17 04:46:48 2018
Copyright (c) 1982, 2014, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
SQL> connect user1/user1
Connected.
SQL> @range_split.sql
DROP TABLE range_split
*
ERROR at line 1:
ORA-00942: table or view does not exist
Table created.
SQL>

On Source

GGSCI (ggsource.doyensys.com) 1> edit params pump1
Extract pump1
UserIDAlias ggsource
RmtHost 192.168.1.35, MgrPort 7810
RmtTrail /u01/app/target/dirdat/ea
Table user1.RANGE_SPLIT, Filter (@RANGE (1, 3));

GGSCI (ggsource.doyensys.com) 2> edit params pump2
Extract pump2
UserIDAlias ggsource
RmtHost 192.168.1.35, MgrPort 7810
RmtTrail /u01/app/target/dirdat/eb
Table user1.RANGE_SPLIT, Filter (@RANGE (2, 3));

GGSCI (ggsource.doyensys.com) 2> edit params pump3
Extract pump3
UserIDAlias ggsource
RmtHost 192.168.1.35, MgrPort 7810
RmtTrail /u01/app/target/dirdat/ec
Table user1.RANGE_SPLIT, Filter (@RANGE (3, 3));

GGSCI (ggsource.doyensys.com) 4> add extract pump1, tranlog, begin now
EXTRACT added.
GGSCI (ggsource.doyensys.com) 10> add extract pump2, tranlog, begin now
EXTRACT added.
GGSCI (ggsource.doyensys.com) 11> add extract pump3, tranlog, begin now
EXTRACT added.
GGSCI (ggsource.doyensys.com) 7> add rmttrail /u01/app/target/dirdat/ea,extract pump1
RMTTRAIL added.
GGSCI (ggsource.doyensys.com) 12> add rmttrail /u01/app/target/dirdat/eb,extract pump2
RMTTRAIL added.
GGSCI (ggsource.doyensys.com) 13> add rmttrail /u01/app/target/dirdat/ec,extract pump3
RMTTRAIL added.
GGSCI (ggsource.doyensys.com) 17> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STOPPED pump1 00:00:00 00:06:17
EXTRACT STOPPED pump2 00:00:00 00:03:50
EXTRACT STOPPED pump3 00:00:00 00:03:41

On Target

GGSCI (ggtarget.doyensys.com) 2> edit params rep1
Replicat rep1
UserIDAlias ggtarget
SourceDefs /u01/app/target/dirdef/rangesplit.def
DiscardFile /u01/app/target/dirrpt/rep1.dsc, Append
Map user1.RANGE_SPLIT, Target user1.RANGE_SPLIT;

GGSCI (ggtarget.doyensys.com) 3> edit params rep2
Replicat rep2
UserIDAlias ggtarget
SourceDefs /u01/app/target/dirdef/rangesplit.def
DiscardFile ./u01/app/target/dirrpt/rep2.dsc, Append
Map user1.RANGE_SPLIT, Target user1.RANGE_SPLIT;

GGSCI (ggtarget.doyensys.com) 4> edit params rep3
Replicat rep3
UserIDAlias ggtarget
SourceDefs /u01/app/target/dirdef/rangesplit.def
DiscardFile ./u01/app/target/dirrpt/rep3.dsc, Append
Map user1.RANGE_SPLIT, Target user1.RANGE_SPLIT;

GGSCI (ggsource.doyensys.com) 7> add replicat rep1,exttrail /u01/app/target/dirdat/ea, checkpointtable ggate.chkptab
REPLICAT added.
GGSCI (ggsource.doyensys.com) 9> add replicat rep2,exttrail /u01/app/target/dirdat/eb, checkpointtable ggate.chkptab
REPLICAT added.
GGSCI (ggsource.doyensys.com) 10> add replicat rep3,exttrail /u01/app/target/dirdat/ec, checkpointtable ggate.chkptab
REPLICAT added.

On Source

GGSCI (ggsource.doyensys.com) 2> start pu*
Sending START request to MANAGER ...
EXTRACT pump1 starting
Sending START request to MANAGER ...
EXTRACT pump2 starting
Sending START request to MANAGER ...
EXTRACT pump3 starting
GGSCI (ggsource.doyensys.com) 3> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT STOPPED EFUNCS 00:00:00 01:44:29
EXTRACT RUNNING pump1 00:00:00 01:01:21
EXTRACT RUNNING pump2 00:00:00 00:58:53
EXTRACT RUNNING pump3 00:00:00 00:58:44
EXTRACT STOPPED ETTOKEN 00:00:00 41:10:43
EXTRACT ABENDED EXT1 00:00:10 645:45:12
EXTRACT ABENDED EXT2 00:00:09 32:42:02
EXTRACT ABENDED OCCEXT 00:00:00 204:43:33
EXTRACT STOPPED PFUNCA 00:00:00 01:44:34
EXTRACT STOPPED PFUNCS 00:00:00 01:44:21

On Target

GGSCI (ggtarget.doyensys.com) 12> start rep*
Sending START request to MANAGER ...
REPLICAT rep1 starting
Sending START request to MANAGER ...
REPLICAT rep2 starting
Sending START request to MANAGER ...
REPLICAT rep3 starting

GGSCI (ggtarget.doyensys.com) 29> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING rep1 00:00:00 00:00:05
REPLICAT RUNNING rep2 00:00:00 00:00:04
REPLICAT RUNNING rep3 00:00:00 00:00:02

On Source

Connect to source database with user1 user schema
SQL> connect user1/user1
Connected.
SQL> exec populate_range_split(500000,1000);

GGSCI (ggsource.doyensys.com) 2> stats extract pump1
Sending STATS request to EXTRACT pump1 ...
Start of Statistics at 2018-04-17 06:15:08.
Output to /u01/app/target/dirdat/ea:
Extracting from user1.RANGE_SPLIT to user1.RANGE_SPLIT:

*** Total statistics since 2018-04-17 06:13:19 ***
Total inserts 36523.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 36523.00

GGSCI (ggsource.doyensys.com) 3> stats extract pump2
Sending STATS request to EXTRACT pump2 ...
Start of Statistics at 2018-04-17 06:15:29.
Output to /u01/app/target/dirdat/ea:
Extracting from user1.RANGE_SPLIT to user1.RANGE_SPLIT:

*** Total statistics since 2018-04-17 06:13:19 ***
Total inserts 43180.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 43180.00

GGSCI (ggsource.doyensys.com) 4> stats extract pump3
Sending STATS request to EXTRACT pump3 ...
Start of Statistics at 2018-04-17 06:15:40.
Output to /u01/app/target/dirdat/eb:
Extracting from user1.RANGE_SPLIT to user1.RANGE_SPLIT:

*** Total statistics since 2018-04-17 06:13:19 ***
Total inserts 46115.00
Total updates 0.00
Total deletes 0.00
Total discards 0.00
Total operations 46115.00

On Target

Check stats of all replicat in target
GGSCI (ggsource.doyensys.com) 40> stats replicat rep1
GGSCI (ggsource.doyensys.com) 41> stats replicat rep2
GGSCI (ggsource.doyensys.com) 42> stats replicat rep3

No comments: