Other Oracle GoldenGate Parameters for MySQL

The following parameters may be of use in MySQL installations, and might be required if non-default settings are used for the MySQL database. Other Oracle GoldenGate parameters will be required in addition to these, depending on your intended business use and configuration.

Parameter Description

DBOPTIONS with CONNECTIONPORT port_number

Required to specify to the VAM the TCP/IP connection port number of the MySQL instance to which an Oracle GoldenGate process must connect if MySQL is not running on the default of 3306.

DBOPTIONS CONNECTIONPORT 3307 

DBOPTIONS with HOST host_id

Specifies the DNS name or IP address of the system hosting MySQL to which Replicat must connect.

DBOPTIONS with ALLOWLOBDATATRUNCATE

Prevents Replicat from abending when replicated LOB data is too large for a target MySQL CHAR, VARCHAR, BINARY or VARBINARY column.

SOURCEDB with USERID and PASSWORD

Specifies database connection information consisting of the database, user name and password to use by an Oracle GoldenGate process that connects to a MySQL database. If MySQL is not running on the default port of 3306, you must specify a complete connection string that includes the port number: SOURCEDB dbname@hostname:port, USERID user, PASSWORD password.Example:

SOURCEDB mydb@mymachine:3307, USERID myuser, PASSWORD mypassword

If you are not running the MySQL database on port 3306, you must also specify the connection port of the MySQL database in the DBLOGIN command when issuing commands that affect the database through GGSCI:

DBLOGIN SOURCEDB dbname@hostname:port, USERID user, PASSWORD password

For example:

GGSCI> DBLOGIN SOURCEDB mydb@mymachine:3307, USERID myuser, PASSWORD mypassword 

SQLEXEC

To enable Replicat to bypass the MySQL connection timeout, configure the following command in a SQLEXEC statement in the Replicat parameter file.

SQLEXEC "select CURRENT_TIME();" EVERY n MINUTES

Where: n is the maximum interval after which you want Replicat to reconnect. The recommended connection timeout 31536000 seconds (365 days).

Global variable sql_mode

For heartbeattable to work in MySQL 5.7 , MySQL global variable sql_mode should not have NO_ZERO_IN_DATE, NO_ZERO_DATE. In the following example sql_mode includes NO_ZERO_IN_DATE,NO_ZERO_DATE values:

mysql> show variables like '%sql_mode%';+---------------+-
+
| Variable_name | Value                                                      
                                                                              
|
+---------------+------------------------------------------------
+
| sql_mode      |
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_
DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+---------------+------------------------------------------------
-----------------------------------------------------------------
+
1 row in set (0.00 sec)
These values must be removed by issuing the following command:
mysql> Set global
sql_mode='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO
_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> show variables like '%sql_mode%';
+---------------+--------------------------------------
-------------------------------------------------+
| Variable_name | Value                                                      
                                                 |
+---------------+--------------------------------------
-------------------------------------------------+
| sql_mode      |
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREA
TE_USER,NO_ENGINE_SUBSTITUTION |
+---------------+-----------------------------------
-------------------------------------------------+
1 row in set (0.01 sec)