Studi kasus GoldenGate : One-way Replication (Initial Load)


Sebelum melakukan initial load, beberapa hal yang harus diperhatikan yaitu:

  • Constraint foreign key dan trigger pada tabel target sebaiknya di disable untuk menghindari error data dan meningkatkan performa goldengate.
  • Jika terdapat index, sebaiknya didrop dulu, setelah proses initial load selesai baru index dicreate lagi.
NO

SOURCE

TARGET

1 Cek data di tabel sumber
Select count(*) from ogguser.emp_5;
3 records
Cek data di tabel target
Select count(*) from ogguser.emp_5;
0 records
2 Buka GGSCI console, ketik:GGSCI>> EDIT PARAMS ELOAD01

EXTRACT ELOAD01
SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)
USERID ogguser, password oggpassword;
RMTHOST 192.168.1.20, MGRPORT 7809;
RMTTASK REPLICAT, GROUP RLOAD01;
TABLE ogguser.emp_5;

Buka GGSCI console, ketik:GGSCI>> EDIT PARAMS RLOAD01

REPLICAT RLOAD01
userid ogguser, password oggpassword;SETENV (NLS_LANG = AMERICAN_AMERICA.AL32UTF8)
ASSUMETARGETDEFS;
HANDLECOLLISIONS
MAP ogguser.emp_5, target ogguser.emp_5;

3 GGSCI>> add extract eload01, sourceistable GGSCI>> Add replicat rload01, specialrun
4 GGSCI>> Start eload01
5  GGSCI>> Start rload01
6 GGSCI>> VIEW REPORT ELOAD01
Processing table OGGUSER.EMP_5
Report at 2012-05-15 17:15:41 (activity since 2012-05-15 17:15:34)
Output to RLOAD01:From Table OGGUSER.EMP_5:
#                   inserts:         3
#                   updates:         0
#                   deletes:         0
#                  discards:         0REDO Log StatisticsBytes parsed                    0
Bytes output                  290 
GGSCI>> VIEW REPORT RLOAD01

MAP resolved (entry OGGUSER.EMP_5):
  MAP OGGUSER.EMP_5, target ogguser.emp_5;
Using following columns in default map by name:
  ID, FIRST_NAME, LAST_NAME

Using the following key columns for target table OGGUSER.EMP_5: ID.

Report at 2012-05-15 17:25:22 (activity since 2012-05-15 17:25:17)

From Table OGGUSER.EMP_5 to OGGUSER.EMP_5:
       #                   inserts:         3
       #                   updates:         0
       #                   deletes:         0
       #                  discards:         0

 

7 Cek data di tabel sumber
Select count(*) from ogguser.emp_5;
3 records
Cek data di tabel target
Select count(*) from ogguser.emp_5;
3 records

Yang Terjadi pada saat proses Initial Load

  • Jika pada saat mengirimkan data ke database target datanya sudah ada, maka data yang di tabel target akan di UPDATE atau di REPLACE dengan data yang di source database.

One thought on “Studi kasus GoldenGate : One-way Replication (Initial Load)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s