Minggu, 25 November 2018

Install and Setup Oracle Golden Gate 12.3.0.1.0 Replicate from MySQL 8.0 to Oracle 12.2.0.1 RAC



Source MySQL 
Server Name                                   : mysql
OS Version                                      : Oracle Linux Server release 7.5
Database Version                            : 8.0.13
Golden Gate Version                      : 12.3.0.1.0 for MySQL
Database Name                               : oggtes
Golden Gate User                           : gguser
Golden Gate Extract                       : EMYSQL
Golden Gate Pump                         : PMYSQL
GoldenGate Home                          : /app/ogg12c


Target Oracle
Server Name                                   : orcl
OS Version                                      : Red Hat Enterprise Linux Server release 7.5
Database Version                            : 12.2.0.1.0
Golden Gate Version                      : 12.3.0.1.0 for Oracle 12c
Database Name                               : orcl
Golden Gate User                           : gguser
Golden Gate Replicat                     : RMYSQL
GoldenGate Home                          : /OGG_stag




  • Parameter my.cnf mysql

[root@mysql ~]# cat /etc/my.cnf
# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
#
# Remove the leading "# " to disable binary logging
# Binary logging captures changes between backups and is enabled by
# default. It's default setting is log_bin=binlog
# disable_log_bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M
#
# Remove leading # to revert to previous value for default_authentication_plugin,
# this will increase compatibility with older clients. For background, see:
# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin
#default-authentication-plugin=mysql_native_password

port=3306

datadir=/app/mysql-data
socket=/app/mysql-data/mysql.sock

log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

log-bin=/app/mysql-data/mysqlsource-bin.log
log-bin-index=/app/mysql-data/mysqlsourcebin-log.index

max_binlog_size=4096M
binlog_format=row
bind-address = 192.60.1.101
#skip-networking

[client]
port=3306

socket=/app/mysql-data/mysql.sock











Install OGG 12.3c on Oracle Database

Create user gguser for ogg
======================

useradd -g oinstall -G dba,oper,asmadmin,asmdba -u 54323 gguser

[gguser@orcl ~]$ cd /source/ogg12c/fbo_ggs_Linux_x64_shiphome/Disk1/
[gguser@orcl Disk1]$ ls -al
total 8
drwxr-xr-x.  5 root root   70 Apr 16  2018 .
drwxr-xr-x.  3 root root   19 Apr 16  2018 ..
drwxr-xr-x.  4 root root  200 Apr 16  2018 install
drwxrwxr-x.  2 root root   25 Apr 16  2018 response
-rwxr-xr-x.  1 root root  918 Apr 16  2018 runInstaller
drwxr-xr-x. 11 root root 4096 Apr 16  2018 stage
[gguser@orcl Disk1]$ ./runInstaller
Starting Oracle Universal Installer...

Checking Temp space: must be greater than 120 MB.   Actual 47089 MB    Passed
Checking swap space: must be greater than 150 MB.   Actual 16383 MB    Passed
Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-11-15_11-24-10AM. Please wait ...[gguser@orcl Disk1]$


















  • Create oggprofile to set Oracle Golden Gate on node 1 and 2 RAC

Node 1

[gguser@orcl ~]$ cat .oggprofile
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1
export OGG_HOME=/OGG_stag
export PATH=$ORACLE_HOME/bin:$OGG_HOME:$PATH
export ORACLE_SID=orcl1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

Node 2

[gguser@orcl ~]$ cat .oggprofile
export ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1
export OGG_HOME=/OGG_stag
export PATH=$ORACLE_HOME/bin:$OGG_HOME:$PATH
export ORACLE_SID=orcl2
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib









Install OGG 12c on MySQL Database

Create User OGG
==============
[root@mysql app]# groupadd -g 54321 oinstall
[root@mysql app]# groupadd -g 54322 dba
[root@mysql app]# groupadd -g 54323 oper
[root@mysql app]# useradd -g oinstall -G dba,oper -u 54323 gguser



Create Software Location and Perform Media Extract
============================================
[root@mysql app]# mkdir -p /app/ogg12c
[root@mysql app]# chown -R gguser:oinstall /app/ogg12c/
[root@mysql app]# ls -al
total 8
drwxr-xr-x.  4 root   root       38 Nov 15 11:03 .
dr-xr-xr-x. 18 root   root     4096 Oct 31 16:17 ..
drwxr-xr-x.  7 mysql  mysql    4096 Nov 12 15:03 mysql-data
drwxr-xr-x.  2 gguser oinstall    6 Nov 15 11:03 ogg12c
[root@mysql ogg12c]# unzip 123015_ggs_Linux_x64_MySQL_64bit.zip
Archive:  123015_ggs_Linux_x64_MySQL_64bit.zip
  inflating: ggs_Linux_x64_MySQL_64bit.tar
  inflating: OGG-12.3.0.1-README.txt
  inflating: OGG_WinUnix_Rel_Notes_12.3.0.1.5.pdf
[root@mysql ogg12c]# tar -xvf ggs_Linux_x64_MySQL_64bit.tar



Create oggprofile
==============
[gguser@mysql ~]$ cat .oggprofile
export OGG_HOME=/app/ogg12c
export PATH=$PATH:/app/ogg12c
export MYSQL_UNIX_PORT=/app/mysql-data/mysql.sock




Starting Oracle Golden Gate Instance
===============================
[gguser@mysql ~]$ . .oggprofile
[gguser@mysql ~]$ cd $OGG_HOME
[gguser@mysql ogg12c]$ ./ggsci

Oracle GoldenGate Command Interpreter for MySQL
Version 12.3.0.1.5 OGGCORE_12.3.0.1.0_PLATFORMS_180501.2124
Linux, x64, 64bit (optimized), MySQL Enterprise on May  2 2018 10:58:16
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2018, Oracle and/or its affiliates. All rights reserved.



GGSCI (mysql) 1> CREATE SUBDIRS

Creating subdirectories under current directory /app/ogg12c

Parameter file                 /app/ogg12c/dirprm: created.
Report file                    /app/ogg12c/dirrpt: created.
Checkpoint file                /app/ogg12c/dirchk: created.
Process status files           /app/ogg12c/dirpcs: created.
SQL script files               /app/ogg12c/dirsql: created.
Database definitions files     /app/ogg12c/dirdef: created.
Extract data files             /app/ogg12c/dirdat: created.
Temporary files                /app/ogg12c/dirtmp: created.
Credential store files         /app/ogg12c/dircrd: created.
Masterkey wallet files         /app/ogg12c/dirwlt: created.
Dump files                     /app/ogg12c/dirdmp: created.


GGSCI (mysql) 2> exit
[root@mysql ogg12c]#









Configure Replicate from MySQL to Oracle

Create MySQL Database and User oggtes for testing On MySQL

mysql> create database oggtes;
Query OK, 1 row affected (0.02 sec)

mysql> CREATE USER 'oggtes'@'localhost' IDENTIFIED BY 'welcome1';
Query OK, 0 rows affected (0.01 sec)

mysql> select host,user from mysql.user where user='oggtes';
+-----------+--------+
| host      | user   |
+-----------+--------+
| localhost | oggtes |
+-----------+--------+
1 row in set (0.00 sec)

mysql> GRANT ALL ON *.* TO 'oggtes'@'localhost';
Query OK, 0 rows affected (0.10 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| oggtes             |
| performance_schema |
| sys                |
+--------------------+
5 rows in set (0.00 sec)

mysql> use oggtes
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> exit





Create the source database tables
==============================
[root@mysql ~]# mysql -u oggtes -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 8.0.13 MySQL Community Server - GPL

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>  use oggtes
Database changed
mysql> SELECT DATABASE();
+------------+
| DATABASE() |
+------------+
| oggtes     |
+------------+
1 row in set (0.00 sec)

mysql> SELECT USER();
+------------------+
| USER()           |
+------------------+
| oggtes@localhost |
+------------------+
1 row in set (0.00 sec)

mysql> create table pegawai (
    -> nip int,
    -> nama varchar(20),
    -> alamat varchar(50))
    -> primary key (nik));
Query OK, 0 rows affected (0.05 sec)

mysql> show tables;
+------------------+
| Tables_in_oggtes |
+------------------+
| pegawai          |
+------------------+
1 row in set (0.00 sec)

mysql> select count(*) as pegawai from pegawai;
+---------+
| pegawai |
+---------+
|       0 |
+---------+
1 row in set (0.00 sec)

mysql> alter table pegawai  ADD PRIMARY KEY(nip);
Query OK, 0 rows affected (0.08 sec)
Records: 0  Duplicates: 0  Warnings: 0

mysql> show columns from pegawai;
+--------+-------------+------+-----+---------+-------+
| Field  | Type        | Null | Key | Default | Extra |
+--------+-------------+------+-----+---------+-------+
| nip    | int(11)     | NO   | PRI | NULL    |       |
| nama   | varchar(20) | YES  |     | NULL    |       |
| alamat | varchar(50) | YES  |     | NULL    |       |
+--------+-------------+------+-----+---------+-------+
3 rows in set (0.00 sec)





Create the target database tables
      ========================
oracle@orcl ~]$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Fri Nov 16 15:59:11 2018

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> select name, open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
ORCL    READ WRITE

SQL> create user oggtes identified by welcome1;


User created.

SQL> grant connect,resource,dba to oggtes;

Grant succeeded.

SQL> conn oggtes/welcome1;
Connected.
SQL> create table pegawai (
  2  nip int,
  3  nama varchar(20),
  4  alamat varchar(50),
  5  primary key (nip))
  6  ;

Table created.

SQL> col tname for a15
SQL> select * from tab;

TNAME           TABTYPE  CLUSTERID
--------------- ------- ----------
PEGAWAI         TABLE

SQL> select count(*) from pegawai;

  COUNT(*)
----------
         0





OGG Configuration on Source MySQL

Login to ggsci
==============
[gguser@mysql ~]$ . .oggprofile
[gguser@mysql ~]$ cd $OGG_HOME
[gguser@mysql ogg12c]$ ./ggsci

Oracle GoldenGate Command Interpreter for MySQL
Version 12.3.0.1.5 OGGCORE_12.3.0.1.0_PLATFORMS_180501.2124
Linux, x64, 64bit (optimized), MySQL Enterprise on May  2 2018 10:58:16
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2018, Oracle and/or its affiliates. All rights reserved.



GGSCI (mysql) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING



Configure Manager
=================
GGSCI (mysql) 1> edit param mgr

GGSCI (mysql) 2> view param mgr

PORT 15100
DYNAMICPORTLIST 15110-15120




Create Extract Group
====================
CREATE EXTRACT AND LOCAL EXTRACT TRAIL OF 50MB

GGSCI (mysql) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING



GGSCI (mysql) 2> add extract EMYSQL, tranlog, begin now
EXTRACT added.


GGSCI (mysql) 3> ADD EXTTRAIL ./dirdat/eo, EXTRACT EMYSQL, MEGABYTES 50
EXTTRAIL added.

GGSCI (mysql) 4> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     STOPPED     EMYSQL      00:00:00      00:00:31

GGSCI (mysql) 5> edit param emysql



GGSCI (mysql) 6> view param emysql

EXTRACT EMYSQL

SETENV (MYSQL_HOME="/app/mysql-data")
SETENV (MYSQL_UNIX_PORT="/app/mysql-data/mysql.sock")

SOURCEDB oggtes, USERID oggtes, password Sekjen2018!

EXTTRAIL ./dirdat/eo
TRANLOGOPTIONS ALTLOGDEST /app/mysql-data/mysqlsourcebin-log.index

TABLE oggtes.*;





Create Pump Extract Group
=========================
CREATE DATA PUMP FOR ORACLE 12C AND REMOTE EXTRACT TRAIL OF 50MB


GGSCI (mysql) 1> ADD EXTRACT pmysql,EXTTRAILSOURCE ./dirdat/eo
EXTRACT added.

GGSCI (mysql) 2> ADD RMTTRAIL ./dirdat/ra, EXTRACT pmysql, MEGABYTES 50
RMTTRAIL added.

GGSCI (mysql) 3> edit param pmysql



GGSCI (mysql) 4> view param pmysql

EXTRACT pmysql
RMTHOST orcl, MGRPORT 7809
RMTTRAIL ./dirdat/ra
PASSTHRU
TABLE oggtes.*;


GGSCI (mysql) 5> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     STOPPED     EMYSQL      00:00:00      00:00:01
EXTRACT     STOPPED     PMYSQL      00:00:00      00:00:00




Create Source Table Definitions
=====================================
[gguser@mysql ogg12c]$ ./ggsci

Oracle GoldenGate Command Interpreter for MySQL
Version 12.3.0.1.5 OGGCORE_12.3.0.1.0_PLATFORMS_180501.2124
Linux, x64, 64bit (optimized), MySQL Enterprise on May  2 2018 10:58:16
Operating system character set identified as UTF-8.

Copyright (C) 1995, 2018, Oracle and/or its affiliates. All rights reserved.




GGSCI (mysql) 1> edit param defgen

GGSCI (mysql) 2> view param defgen1

DEFSFILE ./dirdef/defgen1.def
sourcedb oggtes USERID oggtes PASSWORD Sekjen2018!
TABLE oggtes.*;

[root@mysql dirprm]# pwd
/app/ogg12c/dirprm
[root@mysql dirprm]
[root@mysql dirprm]# ls -al
total 20
drwxr-x---.  2 gguser oinstall   76 Nov 19 14:44 .
drwxr-x---. 18 gguser oinstall 4096 Nov 19 13:10 ..
-rw-r-----.  1 gguser oinstall   97 Nov 19 14:44 defgen1.prm
-rw-r-----.  1 gguser oinstall  269 Nov 18 17:00 emysql.prm
-rw-r-----.  1 gguser oinstall   40 Nov 19 11:34 mgr.prm
-rw-r-----.  1 gguser oinstall  101 Nov 19 10:44 pmysql.prm
[root@mysql dirprm]
[gguser@mysql ogg12c]$ ./defgen paramfile /app/ogg12c/dirprm/defgen1.prm

***********************************************************************
        Oracle GoldenGate Table Definition Generator for MySQL
      Version 12.3.0.1.5 OGGCORE_12.3.0.1.0_PLATFORMS_180501.2124
 Linux, x64, 64bit (optimized), MySQL Enterprise on May  2 2018 11:14:13

Copyright (C) 1995, 2018, Oracle and/or its affiliates. All rights reserved.


                    Starting at 2018-11-19 14:55:12
***********************************************************************

Operating System Version:
Linux
Version #2 SMP Mon Mar 12 23:57:12 PDT 2018, Release 4.1.12-112.16.4.el7uek.x86_64
Node: mysql
Machine: x86_64
                         soft limit   hard limit
Address Space Size   :    unlimited    unlimited
Heap Size            :    unlimited    unlimited
File Size            :    unlimited    unlimited
CPU Time             :    unlimited    unlimited

Process id: 31979

***********************************************************************
**            Running with the following parameters                  **
***********************************************************************
DEFSFILE ./dirdef/defgen1.def
sourcedb oggtes USERID oggtes PASSWORD ***
TABLE oggtes.*;
Expanding wildcard table specification oggtes.*:

Retrieving definition for oggtes.oggchkpt.
Retrieving definition for oggtes.oggchkpt_lox.
Retrieving definition for oggtes.pegawai.


Definitions generated for 3 tables in ./dirdef/defgen1.def.




copy the definition table to target host.
=========================================
[gguser@mysql dirdef]$ scp /app/ogg12c/dirdef/defgen1.def root@192.61.1.101:/OGG_stag/dirdef
The authenticity of host '192.61.1.101 (192.61.1.101)' can't be established.
ECDSA key fingerprint is SHA256:qwUQqKCuSvHelOtfBkuZ7vpB2nIW+s9BR/5b5rogHM4.
ECDSA key fingerprint is MD5:93:60:c5:b8:9e:ca:3c:73:81:a4:a0:e4:26:2f:98:7e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.61.1.101' (ECDSA) to the list of known hosts.
root@192.61.1.101's password:
defgen1.def                                      100% 3664     5.3MB/s   00:00

[root@orcl dirdef]# pwd
/OGG_stag/dirdef
[root@orcl dirdef]# ls -al
total 88
drwxr-x---.  2 gguser oinstall 20480 Nov 21 11:22 .
drwxrwxr-x. 30 gguser oinstall 32768 Nov 19 13:30 ..
-rw-r-----.  1 root   root      3664 Nov 21 11:22 defgen1.def




OGG Configuration on Target Oracle 12C

Login to Database
==================
GGSCI (orcl) 1> dblogin userid oggtes, password welcome1
Successfully logged into database.

GGSCI (orcl as oggtes@orcl1) 2>

GSCI (orcl) 2> dblogin userid oggtes@orcl, password welc     ome1
Successfully logged into database.

GGSCI (orcl as oggtes@orcl1) 3>



Configure Manager
=================
GGSCI (orcl as oggtes@orcl1) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED

GGSCI (orcl) 2> edit param mgr

GGSCI (orcl) 3> view param mgr

PORT 7809
DYNAMICPORTLIST 7810-7820
purgeoldextracts ./dirdat/*, usecheckpoints



Set up the checkpoint table
===========================
GGSCI (orcl) 4> edit param ./GLOBALS

GGSCI (orcl) 5> view param ./GLOBALS

GGSCHEMA oggtes
checkpointtable oggtes.oggchkpt

For the GLOBALS configuration to take effect, you must exit the session in which the changes were made. Execute the following command to exit GGSCI.

GGSCI (orcl) 6> exit




Add a Replicat checkpoint table
===============================
GGSCI (orcl) 1> dblogin userid oggtes, password welcome1
Successfully logged into database.

GGSCI (orcl as oggtes@orcl1) 2> ADD CHECKPOINTTABLE oggte     s.checkpoint

Successfully created checkpoint table oggtes.checkpoint.




Create the Replicat Group
=========================
GGSCI (orcl as oggtes@orcl1) 3> ADD REPLICAT rmysql, EXTT     RAIL ./dirdat/ra, CHECKPOINTTABLE oggtes.CHECKPOINT
REPLICAT added.


GGSCI (orcl as oggtes@orcl1) 4> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED
REPLICAT    STOPPED     RMYSQL      00:00:00      00:00:11

GGSCI (orcl) 5> edit param rmysql

GGSCI (orcl) 6> view param rmysql

REPLICAT RMYSQL

USERID oggtes@orcl, PASSWORD welcome1

SOURCEDEFS /OGG_stag/dirdef/defgen1.def
DISCARDFILE /OGG_stag/dirrpt/rmysql.dsc, append

MAP oggtes.*, TARGET oggtes.*;





On Source (MySQL) Start Manager, Extract and Pump
=================================================
GGSCI (mysql) 7> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED
EXTRACT     STOPPED     EMYSQL      00:00:00      00:00:06
EXTRACT     STOPPED     PMYSQL      00:00:00      00:00:06

GGSCI (mysql) 8> start mgr
Manager started.


GGSCI (mysql) 9> start extract *

Sending START request to MANAGER ...
EXTRACT EMYSQL starting

Sending START request to MANAGER ...
EXTRACT PMYSQL starting


GGSCI (mysql) 10> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     EMYSQL      00:00:00      00:00:01
EXTRACT     RUNNING     PMYSQL      00:00:00      00:00:40






On Target (Oracle 12C) start the Manager and Replicat
      =======================================
GGSCI (orcl) 1> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     STOPPED
REPLICAT    STOPPED     RMYSQL      00:00:00      00:00:11

GGSCI (orcl) 2> start mgr
Manager started.


GGSCI (orcl) 3> start rmysql

Sending START request to MANAGER ...
REPLICAT RMYSQL starting


GGSCI (orcl) 4> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     RMYSQL      00:00:00      00:00:01






Execute Insert on the Source Oracle Database MySQL
================================================
[root@mysql ~]# mysql -u oggtes -p
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 36
Server version: 8.0.13 MySQL Community Server - GPL

Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use oggtes
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

mysql> insert into pegawai values (10,'erer','mmmmm');
Query OK, 1 row affected (0.09 sec)

mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql> select * from pegawai;
+-----+--------+--------+
| nip | nama   | alamat |
+-----+--------+--------+
|  10 | erer   | mmmmm  |
+-----+--------+--------+
5 rows in set (0.00 sec)

GGSCI (mysql) 3> stats emysql total

Sending STATS request to EXTRACT EMYSQL ...

Start of Statistics at 2018-11-21 17:27:31.

Output to ./dirdat/eo:

Extracting from oggtes.pegawai to oggtes.pegawai:

*** Total statistics since 2018-11-21 16:19:31 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

Extracting from oggtes.siswa to oggtes.siswa:

*** Total statistics since 2018-11-21 16:19:31 ***
        Total inserts                                      2.00
        Total updates                                      1.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   3.00

End of Statistics.


GGSCI (mysql) 5> stats pmysql total

Sending STATS request to EXTRACT PMYSQL ...

Start of Statistics at 2018-11-21 17:27:45.

Output to ./dirdat/ra:

Extracting from oggtes.pegawai to oggtes.pegawai:

*** Total statistics since 2018-11-21 16:19:33 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

Extracting from oggtes.siswa to oggtes.siswa:

*** Total statistics since 2018-11-21 16:19:33 ***
        Total inserts                                      2.00
        Total updates                                      1.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   3.00

End of Statistics.


GGSCI (mysql) 6>







    Verify Insert Changes on Target Oracle Database Oracle 12c
    ===========================================
GGSCI (orcl) 10> stats rmysql total

Sending STATS request to REPLICAT RMYSQL ...

Start of Statistics at 2018-11-21 17:28:32.

Replicating from oggtes.pegawai to OGGTES.PEGAWAI:

*** Total statistics since 2018-11-21 16:19:36 ***
        Total inserts                                      1.00
        Total updates                                      0.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   1.00

Replicating from oggtes.siswa to OGGTES.SISWA:

*** Total statistics since 2018-11-21 16:19:36 ***
        Total inserts                                      2.00
        Total updates                                      1.00
        Total deletes                                      0.00
        Total discards                                     0.00
        Total operations                                   3.00

End of Statistics.

GGSCI (orcl) 10>

SQL> select * from pegawai;

       NIP NAMA
---------- --------------------ALAMAT
--------------------------------------------------
        10 erer
Mmmmm





Execute update on the Source Oracle Database MySQL ( use table siswa)
=================================================================
mysql> select * from siswa;
+-----+------+---------+
| nik | nama | telepon |
+-----+------+---------+
|   1 | budi |  219999 |
|   2 | andi |    9999 |
+-----+------+---------+
2 rows in set (0.01 sec)

mysql> update siswa set nama='akmal',telepon=11111 where nik=1;
Query OK, 1 row affected (0.09 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> commit;
Query OK, 0 rows affected (0.00 sec)

mysql> select * from siswa;
+-----+-------+---------+
| nik | nama  | telepon |
+-----+-------+---------+
|   1 | akmal |   11111 |
|   2 | andi  |    9999 |
+-----+-------+---------+
2 rows in set (0.00 sec)




Verify Update Changes on Target Oracle Database Oracle 12c
============================================
Before update

SQL> select * from siswa;

       NIK NAMA                    TELEPON
---------- -------------------- ----------
         1 budi                     219999
         2 andi                       9999


After update
                                 
SQL> select * from siswa;

       NIK NAMA                    TELEPON
---------- -------------------- ----------
         1 akmal                     11111
         2 andi                       9999

Tidak ada komentar:

Posting Komentar