How to set up heterogeneous replication using tungsten?

I have recently been working on replication between heterogeneous dbs with the Tungsten Replicator . We have mysql master and oracle slavery. According to the docs, this setting should work. I am using tungsten replicator 2.0.5. I'm calling

$TUNGSTEN_HOME/tools/configure \ --verbose \ --home-directory=$INSTALL_HOME \ --cluster-hosts=$MA_HOST,$SL_HOST \ 

on the main node to create a basic installation on both nodes. Note: using the installer (as recommended) fails due to heterogeneous configuration because the installer could not find the mysql instance on the slave node. Replicator instances are configured by adding static- $ SERVICENAME.properties to the conf directory and changing conf / services.properties (replicator.host = $ HOSTNAME, replicator.masterListenPortStart = 12112, replicator.rmi_port = 20000).

The launch of replicators led to the creation of ORA-01850 when issuing update instructions for trep_commit_seqno in a tungsten schema due to the lack of the timestamp keyword in SQL-Statement. In order to go beyond this error, I changed the data type update_timestamp and extract_timestamp to varchar. Replicators now trigger some simple inserts where they are replicated, but when the test script issues

 DROP TABLE IF EXISTS table1; 

Failed to replicate due to ORA-00933 due to IF EXISTS clause. I'm not sure if this is a mistake in my configuration or if tungsten has problems with differences in DDL statements between the two products at all. Has anyone successfully created this replication using tungsten?

+4
source share
2 answers

The tungsten documentation contains some helpful suggestions. In particular, this clause of the "Extended Principles of Work" has the meaning: "In addition, DDL statements outside of the simplest CREATE TABLE statements are rarely portable." In your case, DROP TABLE IF EXISTS table1; Invalid Oracle DDL.

Read here .

+2
source

For anyone who is interested: Tungsten still does not perform any transformations of ddl operators in a heterogeneous environment (as Mithusasidharan wrote). Now I have written a special filter that skips ddl instructions using regular expressions. To synchronize the schema definition, we will use Apache DdlUtils , which is great for converting the schema definition between mysql and oracle. I guess this works equally well for other vendors. Thank you

+2
source

Source: https://habr.com/ru/post/1381106/


All Articles