Oracle to MySQL Heterogeneous Unidirectional Replication
Hello Readers,
In this article we will see how to make Heterogeneous Unidirectional Replication between Oracle and MySQL.
Source : Oracle DB(12.1.0)
Target : MySQL(5.7)
Download Goldengate Binaries
Download GoldenGate binaries from Oracle.com using below link(Oracle)
https://www.oracle.com/technetwork/middleware/goldengate/downloads/index.html
Make sure that you are using the correct OS version of binaries.
SOURCE ORACLE :
Setting bash_profile
Export the path in the bash profile
vi .bash_profile
1 2 3 4 5 6 |
export ORACLE_SID=primary export ORACLE_HOME=/u01/app/oracle/product/12.1.0 export PATH=$ORACLE_HOME/bin:$PATH:. export ORACLE_NET=$ORACLE_HOME/network/admin export GGS_HOME=/oraeng/app/oracle/product/ogg_src export LD_LIBRARY_PATH=$ORACLE_HOME/lib |
Run the bash_profile file
1 |
[oracle@gg1 ~]$ . .bash_profile |
Check instance info :
1 2 3 4 5 |
SYS>>select name||' - '||instance_name||'@'||host_name||' - '||DB_UNIQUE_NAME||' - '||version||' - '||open_mode||' - '||to_char(startup_time,'DD-MON-YYYY HH24:MI:SS') || ' - '|| database_role from v$database, v$instance; NAME||'-'||INSTANCE_NAME||'@'||HOST_NAME||'-'||DB_UNIQUE_NAME||'-'||VERSION||'-'||OPEN_MODE||'-'||TO_CHAR(STARTUP_TIME,'DD-MON-YYYYHH24:MI:SS')||'-'||DATABASE_ROLE ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- PRIMARY - primary@gg1.orcl.com - primary - 12.1.0.2.0 - READ WRITE - 05-JUN-2019 18:00:05 - PRIMARY |
Create directory for gg home :
Create directory fo gghome
1 2 3 |
[root@gg1 ~]# mkdir -p /oraeng/app/oracle/product/ogg_src [root@gg1 ~]# chown -R oracle:oinstall /oraeng/app/oracle/product/ogg_src [root@gg1 ~]# chmod -R 755 /oraeng/app/oracle/product/ogg_src |
Copy the downloaded file to /opt location Using Winscp
Unzip GoldenGate Software :
Check file in /opt dir :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
[oracle@gg1 opt]$ ls -ltr total 532148 drwxr-xr-x. 3 oracle dba 4096 May 9 21:30 fbo_ggs_Linux_x64_shiphome -rwxrwxrwx. 1 oracle dba 189027 May 11 02:25 OGG_WinUnix_Rel_Notes_19.1.0.0.0.pdf -rwxrwxrwx. 1 oracle dba 1412 May 11 03:19 OGG-19.1.0.0-README.txt -rw-r--r--. 1 root root 544713582 May 31 08:46 191000_fbo_ggs_Linux_x64_shiphome.zip GOTO gbo_ directory [oracle@gg1 opt]$ cd fbo_ggs_Linux_x64_shiphome/ [oracle@gg1 fbo_ggs_Linux_x64_shiphome]$ ls -ltr total 4 drwxr-xr-x. 5 oracle dba 4096 May 9 21:30 Disk1 GOTO Disk1 directory [oracle@gg1 fbo_ggs_Linux_x64_shiphome]$ cd Disk1/ [oracle@gg1 Disk1]$ ls -ltr total 6 drwxr-xr-x.4 oracle dba 4096 May 9 21:29 install drwxr-xr-x.12 oracle dba 4096 May 9 21:30 stage -rwxr-xr-x.1 oracle dba 918 May 9 21:30 runInstaller drwxrwxr-x.2 oracle dba 4096 May 9 21:30 response |
Now do runinstaller as Oracle user :
[oracle@gg1 Disk1]$ ./runInstaller
Starting Oracle Universal Installer…
Checking Temp space: must be greater than 120 MB. Actual 3551 MB Passed
Checking swap space: must be greater than 150 MB. Actual 7999 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2019-06-04_06-23-03PM. Please wait …
On step 1 choose version of your oracle software
Click on Next
Browse location for GG_HOME
Start Manager with any port number
Click on Next
Check summary
Click on Install
Installation will start
Finally GG will successfully installed on GG1
Click on Close
Goto GGS_HOME and connect to ./ggsci
Give info all to check manager process is running or not
Open New terminal for SQL prompt Source database:
Connect to database and create user and tables
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
[oracle@gg1 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Tue Jun 4 18:58:11 2019 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 option SYS>>grant dba to Ktexperts identified by ktexperts; Grant succeeded. SYS>>conn ktexperts/ktexperts Connected. KTEXPERTS>> KTEXPERTS>>create table dept (deptno number,dname varchar2(10),loc varchar2(15)); Table created. Elapsed: 00:00:00.20 KTEXPERTS>>alter table dept add primary key(deptno); Table altered. Elapsed: 00:00:00.56 KTEXPERTS>> KTEXPERTS>>SELECT CONSTRAINT_NAME, SEARCH_CONDITION AS CONSTRAINT_TYPE FROM USER_CONSTRAINTS WHERE TABLE_NAME=' DEPT’; CONSTRAINT_NAME CONSTRAINT_TYPE --------------------------- ----------------------------- SYS_C005224 |
Enable the parameter for GoldenGate replication
1 2 |
SYS>>alter system set enable_goldengate_replication=true; System altered. |
Create admin for GoldeGate
1 2 3 4 5 6 |
SYS>>create user ggadmin identified by ggadmin; User created. Elapsed: 00:00:00.09 SYS>>grant dba to ggadmin; Grant succeeded. Elapsed: 00:00:00.01 |
Now execute below Package for additional privs
1 2 3 |
SYS>>exec DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE(grantee=>'ggadmin',privilege_type=>'CAPTURE',grant_optional_privileges=>'*'); PL/SQL procedure successfully completed. Elapsed: 00:00:06.34 |
Add supplemental logdata on columns
1 2 |
SYS>>alter database add supplemental log data(all) columns; Database altered. |
Check archive-log enabled or not
1 2 3 4 5 6 7 |
SYS>>archive log list Database log mode Archive Mode Automatic archival Enabled Archive destination /u01/oradata/primary/arch Oldest online log sequence 1287 Next log sequence to archive 1288 Current log sequence 1288 |
On GGSCI terminal (GG1) :
Login with user credentials(ggadmin)
1 2 |
GGSCI (gg1.orcl.com) 2> dblogin userid ggadmin@primary,password ggadmin Successfully logged into database. |
Add Trandata on which table you want to perform replication
1 2 3 4 |
GGSCI (gg1.orcl.com as ggadmin@primary) 3> add trandata ktexperts.dept 2019-06-04 19:21:59 INFO OGG-15132 Logging of supplemental redo data enabled for table KTEXPERTS.DEPT. 2019-06-04 19:21:59 INFO OGG-15133 TRANDATA for scheduling columns has been added on table KTEXPERTS.DEPT. 2019-06-04 19:21:59 INFO OGG-15135 TRANDATA for instantiation CSN has been added on table KTEXPERTS.DEPT. |
Add extract using below command
1 2 |
GGSCI (gg1.orcl.com as ggadmin@primary) 4> add extract extint,integrated tranlog,begin now EXTRACT (Integrated) added. |
Register extract process on database
1 2 |
GGSCI (gg1.orcl.com as ggadmin@primary) 5> register extract extint database 2019-06-04 19:25:05 INFO OGG-02003 Extract EXTINT successfully registered with database at SCN 2510571. |
Now add Exttrail file
1 2 |
GGSCI (gg1.orcl.com as ggadmin@primary) 6> ADD EXTTRAIL /oraeng/app/oracle/product/ogg_src/dirdat/lt, EXTRACT EXTINT EXTTRAIL added. |
Add datapump process
1 2 |
GGSCI (gg1.orcl.com as ggadmin@primary) 7> add extract dpint,exttrailsource /oraeng/app/oracle/product/ogg_src/dirdat/lt EXTRACT added. |
Add Remote trail file
1 2 |
GGSCI (gg1.orcl.com as ggadmin@primary) 8> add rmttrail /opt/dirdat/rt, extract dpint RMTTRAIL added |
Check info all
Two more extract process will added
1 2 3 4 5 |
GGSCI (gg1.orcl.com as ggadmin@primary) 9> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT STOPPED DPINT 00:00:00 00:01:19 EXTRACT STOPPED EXTINT 00:00:00 00:09:05 |
Create wallet and add credentialstore to make aliasname for userlogin
1 2 3 4 5 6 7 |
GGSCI (gg1.orcl.com as ggadmin@primary) 10> create wallet Created wallet. Opened wallet. GGSCI (gg1.orcl.com as ggadmin@primary) 11> add credentialstore Credential store created. GGSCI (gg1.orcl.com as ggadmin@primary) 12> alter credentialstore add user ggadmin@primary,password ggadmin,alias ggadmin_src Credential store altered. |
From now user can able to login with alias-name called ggadmin_src
1 2 |
GGSCI (gg1.orcl.com as ggadmin@primary) 13> dblogin useridalias ggadmin_src Successfully logged into database. |
Edit the parameter for extint
1 2 3 4 5 6 7 8 |
GGSCI (gg1.orcl.com as ggadmin@primary) 14> edit param extint EXTRACT EXTINT SETENV(ORACLE_SID='primary') SETENV(ORACLE_HOME='/u01/app/oracle/product/12.1.0') useridalias ggadmin_src TRANLOGOPTIONS INTEGRATEDPARAMS(MAX_SGA_SIZE 100) EXTTRAIL /oraeng/app/oracle/product/ogg_src/dirdat/lt TABLE KTEXPERTS.DEPT; |
Edit the parameter for dpint
1 2 3 4 5 6 |
GGSCI (gg1.orcl.com as ggadmin@primary) 15> edit param dpint EXTRACT DPINT RMTHOST 13.232.169.177,MGRPORT 7809 RMTTRAIL /opt/dirdat/rt PASSTHRU TABLE KTEXPERTS.DEPT; |
Check info all
1 2 3 4 5 6 |
GGSCI (gg1.orcl.com as ggadmin@primary) 16> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT STOPPED DPINT 00:00:00 00:25:29 EXTRACT STOPPED EXTINT 00:00:00 00:33:15 |
Start both params extint and dpint
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
GGSCI (gg1.orcl.com as ggadmin@primary) 17> start extint Sending START request to MANAGER ... EXTRACT EXTINT starting GGSCI (gg1.orcl.com as ggadmin@primary) 18> ! start extint Sending START request to MANAGER ... EXTRACT EXTINT starting GGSCI (gg1.orcl.com as ggadmin@primary) 19> ! start extint EXTRACT EXTINT is already running. GGSCI (gg1.orcl.com as ggadmin@primary) 20> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT STOPPED DPINT 00:00:00 00:25:43 EXTRACT RUNNING EXTINT 00:00:00 00:33:28 ######EXTINT RUNNING ############################## ####################START DPINT ############################ GGSCI (gg1.orcl.com as ggadmin@primary) 21> start dpint Sending START request to MANAGER ... EXTRACT DPINT starting GGSCI (gg1.orcl.com as ggadmin@primary) 22> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING EXTRACT RUNNING DPINT 00:00:00 00:00:01 EXTRACT RUNNING EXTINT 00:00:03 00:00:06 ###############BOTH ARE RUNNING fine ####################### ##If not running then use view report dpint/extint ####################### |
Now do insert operation on ktexperts
1 2 3 4 5 6 7 8 9 |
KTEXPERTS>>insert into dept values(10,'SALES','IND'); 1 row created. Elapsed: 00:00:00.21 KTEXPERTS>>insert into dept values(20,'MARK','SA'); 1 row created. KTEXPERTS>>insert into dept values(30,'IT','CANADA'); 1 row created. KTEXPERTS>> commit; commit complete. |
Check extract and datapump process collecting stats or not
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
GGSCI (gg1.orcl.ocm as ggadmin@orcl) 23> stats extint Sending STATS request to EXTRACT EXTINT ... Start of Statistics at 2019-06-14 20:51:40. Output to /oraeng/app/oracle/product/ogg_src/dirdat/lt: Extracting from KTEXPERTS.DEPT to KTEXPERTS.DEPT: *** Total statistics since 2019-06-04 20:51:33 *** Total inserts 3.00 Total updates 0.00 Total deletes 0.00 Total upserts 0.00 Total discards 0.00 Total operations 3.00 *** Daily statistics since 2019-06-04 20:51:33 *** Total inserts 3.00 Total updates 0.00 Total deletes 0.00 Total upserts 0.00 Total discards 0.00 Total operations 3.00 *** Hourly statistics since 2019-06-04 20:51:33 *** Total inserts 3.00 Total updates 0.00 Total deletes 0.00 Total upserts 0.00 Total discards 0.00 Total operations 1.00 *** Latest statistics since 2019-06-04 20:51:33 *** Total inserts 3.00 Total updates 0.00 Total deletes 0.00 Total upserts 0.00 Total discards 0.00 Total operations 3.00 End of Statistics. |
Check datapump process Stats
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
GGSCI (gg1.orcl.com as ggadmin@orcl) 24> stats dpint Sending STATS request to EXTRACT DPINT ... Start of Statistics at 2019-06-04 20:54:50. Output to /opt/dirdat/rt: Extracting from KTEXPERTS.DEPT to KTEXPERTS.DEPT: *** Total statistics since 2019-06-04 20:51:34 *** Total inserts 3.00 Total updates 0.00 Total deletes 0.00 Total upserts 0.00 Total discards 0.00 Total operations 3.00 *** Daily statistics since 2019-06-04 20:51:34 *** Total inserts 3.00 Total updates 0.00 Total deletes 0.00 Total upserts 0.00 Total discards 0.00 Total operations 3.00 *** Hourly statistics since 2019-06-04 20:51:34 *** Total inserts 3.00 Total updates 0.00 Total deletes 0.00 Total upserts 0.00 Total discards 0.00 Total operations 3.00 *** Latest statstics since 2019-06-04 20:51:34 *** Total inserts 3.00 Total updates 0.00 Total deletes 0.00 Total upserts 0.00 Total discards 0.00 Total operations 3.00 End of Statistics. |
Everything is fine at Source side now we will do Target (MySQL)
TARGET MYSQL :
Starting on the MySQL database server, mysql1, install the GoldenGate software.
Start the MySQL
1 2 |
[root@mysql ~]# service mysqld start Redirecting to /bin/systemctl start mysqld.service |
Check MySQL is riunning or not
1 2 3 |
[root@mysql ~]# ps -ef |grep mysql mysql 108336 1 4 01:21 ? 00:00:00 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid root 108365 108186 0 01:21 pts/2 00:00:00 grep --color=auto mysql |
Check MySQL server status
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
[root@mysql ~]# service mysqld status Redirecting to /bin/systemctl status mysqld.service ● mysqld.service - MySQL Server Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled) Active: active (running) since Thu 2019-06-06 01:21:38 EDT; 37s ago Docs: man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html Process: 108333 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS) Process: 108256 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS) Main PID: 108336 (mysqld) CGroup: /system.slice/mysqld.service └─108336 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid Jun 06 01:21:33 mysql.orcl.com systemd[1]: Starting MySQL Server... Jun 06 01:21:38 mysql.orcl.com systemd[1]: Started MySQL Server. |
Connect to MySQL and check the databases.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
[root@mysql ~]# mysql -u root -pWElcome@@1 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 6 Server version: 5.7.26 MySQL Community Server (GPL) Copyright (c) 2000, 2019, 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> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | sys | +--------------------+ 4 rows in set (0.00 sec) |
set the Bash_profile
1 2 3 |
[root@mysql ~]# vi .bash_profile export MYSQL_HOME=/usr/bin export LD_LIBRARY_PATH=/opt |
Run the bash_profile
1 |
[root@mysql ~]# . .bash_profile |
Edit my.cnf file and add the following parameters
1 2 3 4 5 6 7 8 9 10 |
[root@mysql ~]# vi /etc/my.cnf server-id=1 [mysqld] log-bin=/var/lib/mysql/mgg-bin max_binlog_size=4096 binlog_format=row socket=/tmp/mysql.sock [client] socket=/tmp/mysql.sock |
Now copy GoldenGate software into /opt
1 2 3 4 |
[root@mysql opt]# ls -l total 68456 -rw-r--r--. 1 root root 70098487 Jun 1 21:10 191000_ggs_Linux_x64_MySQL_64bit.zip drwxr-xr-x. 2 root root 6 Oct 30 2018 rh |
Unzip the S/W file
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
[root@mysql opt]# unzip 191000_ggs_Linux_x64_MySQL_64bit.zip Archive: 191000_ggs_Linux_x64_MySQL_64bit.zip inflating: ggs_Linux_x64_MySQL_64bit.tar inflating: OGG-19.1.0.0-README.txt inflating: OGG_WinUnix_Rel_Notes_19.1.0.0.0.pdf [root@mysql opt]# ls -latr total 346208 drwxr-xr-x. 2 root root 6 Oct 30 2018 rh -rw-rw-r--. 1 root root 284221440 May 8 23:54 ggs_Linux_x64_MySQL_64bit.tar -rwxrwxrwx. 1 root root 189027 May 10 16:55 OGG_WinUnix_Rel_Notes_19.1.0.0.0.pdf -rwxrwxrwx. 1 root root 1412 May 10 17:49 OGG-19.1.0.0-README.txt -rw-r--r--. 1 root root 70098487 Jun 1 21:10 191000_ggs_Linux_x64_MySQL_64bit.zip dr-xr-xr-x. 17 root root 224 Jun 6 00:11 .. drwxr-xr-x. 3 root root 172 Jun 6 03:30 . |
untar the file
1 |
[root@mysql opt]# tar -xvf ggs_Linux_x64_MySQL_64bit.tar |
Run the ./ggsci command and create sub directories
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
[root@mysql opt]# ./ggsci Oracle GoldenGate Command Interpreter for MySQL Version 19.1.0.0.0 OGGCORE_19.1.0.0.0_PLATFORMS_190508.1447 Linux, x64, 64bit (optimized), MySQL Enterprise on May 8 2019 20:42:57 Operating system character set identified as UTF-8. Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved. GGSCI (mysql.orcl.com) 1> create subdirs Creating subdirectories under current directory /opt Parameter file /opt/dirprm: created. Report file /opt/dirrpt: created. Checkpoint file /opt/dirchk: created. Process status files /opt/dirpcs: created. SQL script files /opt/dirsql: created. Database definitions files /opt/dirdef: created. Extract data files /opt/dirdat: created. Temporary files /opt/dirtmp: created. Credential store files /opt/dircrd: created. Masterkey wallet files /opt/dirwlt: created. Dump files /opt/dirdmp: created. |
Check manager sunning or not , If not start the Mgr after specifying the port
1 2 3 4 5 6 7 8 9 10 11 12 13 |
GGSCI (mysql.orcl.com) 2> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER STOPPED GGSCI (mysql.orcl.com) 3> edit param mgr PORT 7809 GGSCI (mysql.orcl.com) 4> start mgr GGSCI (mysql.orcl.com) 5> info all Program Status Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING |
Connect as Root user and create users
1 2 3 4 5 6 7 |
mysql>CREATE USER 'ogguser1'@'localhost' IDENTIFIED BY 'WElcome@@1'; mysql>CREATE USER 'oggadm1'@'localhost' IDENTIFIED BY 'WElcome@@1'; mysql>GRANT ALL PRIVILEGES ON *.* TO 'ogguser1'@'localhost'; mysql>GRANT ALL PRIVILEGES ON *.* TO 'oggadm1'@'localhost'; |
Create database
1 |
CREATE DATABASE oggdb1; |
Connect to oggdb1 and create objects
1 2 3 4 5 6 7 |
mysql> USE oggdb1; mysql> CREATE TABLE oggdb1.DEPT ( DEPTNO TINYINT, DNAME VARCHAR(14), LOC VARCHAR(13) ); |
Create unique index on dept table
1 |
mysql> CREATE UNIQUE INDEX PK_DEPT ON oggdb1.DEPT(DEPTNO); |
Connect to GGSCI on the MySQL server and create the replicat . Also, note that the parameters point to the target (MySQL) database.
Login as oggadm1
1 2 |
/opt]# ./ggsci GGSCI>dblogin SourceDB oggdb1, UserID oggadm1, Password WElcome@@1 |
Add checkpoint table
1 2 |
GGSCI(mysql.orcl.com DBLOGIN as oggadm1) 6> add checkpointtable oggdb1.chkpttbl Successfully created checkpoint table oggdb1.chkpttbl. |
Add replicat process
1 2 |
GGSCI ( mysql.orcl.com DBLOGIN as oggadm1) 7> add replicat rep1,exttrail /opt/dirdat/rt,checkpointtable oggdb1.chkpttbl REPLICAT added. |
Edit the param file for replicat
1 2 3 4 5 |
GGSCI (mysql.orcl.com DBLOGIN as oggadm1) 8> edit param rep1 replicat rep1 SETENV(MYSQL_HOME='/usr/bin') TARGETDB oggdb1, UserID oggadm1, Password WElcome@@1 MAP ktexperts.dept,target oggdb1.DEPT; |
Start the replicat process
1 2 3 4 5 6 7 8 9 10 11 12 13 |
GGSCI (mysql.orcl.com DBLOGIN as ggadmin@orcl) 9> start repmysql Sending START request to MANAGER ... REPLICAT REPMYSQL starting GGSCI (mysql.orcl.com DBLOGIN as ggadmin@orcl) 10> ! start repmysql REPLICAT REPMYSQL is already running. GGSCI (mysql.orcl.com DBLOGIN as ggadmin@orcl) 11> info all Program Stats Group Lag at Chkpt Time Since Chkpt MANAGER RUNNING REPLICAT RUNNING REP1 00:00:00 00:00:05 |
Check Stats of REP1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
GGSCI (mysql.orcl.com DBLOGIN as oggadm1) 8> stats rep1 Sending STATS request to REPLICAT REP1 ... Start of Statistics at 2019-06-04 20:58:52. Replicating from KTEXPERTS.DEPT to oggdb1.DEPT: *** Total statistics since 2019-06-04 20:51:36 *** Total inserts 3.00 Total updates 0.00 Total deletes 0.00 Total upserts 0.00 Total discards 0.00 Total operations 3.00 *** Daily statistics since 2019-06-04 20:51:36 *** Total inserts 3.00 Total updates 0.00 Total deletes 0.00 Total upserts 0.00 Total discards 0.00 Total operations 3.00 *** Hourly statistics since 2019-06-04 20:51:36 *** Total inserts 3.00 Total updates 0.00 Total deletes 0.00 Total upserts 0.00 Total discards 0.00 Total operations 3.00 *** Latest statistics since 2019-06-04 20:51:36 *** Total inserts 3.00 Total updates 0.00 Total deletes 0.00 Total upserts 0.00 Total discards 0.00 Total operations 3.00 End of Statistics. |
Connect to MySQL and check records
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
mysql> use oggdb2 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> select * from DEPT; +--------+-------+------+ | DEPTNO | DNAME | LOC | +--------+-------+------+ | 10 | SALES | IND | | 20 | MARK | SA | | 30 | IT | CANADA | +--------+-------+------+ 1 row in set (0.00 sec) mysql> |
Yes Heterogeneous Unidirectional Replication between Oracle to MySQL was working fine.
In the same way perform all DML transactions at Source and check and Target.
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates
KTEXPERTS is always active on below social media platforms.
Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts
Instagram : https://www.instagram.com/knowledgesharingplatform
My Linkedin : https://www.linkedin.com/in/ajay-kumar90/