Plug-in Based DDL Configuration Prerequisites and Considerations

This is an older approach to performing DDL Replication. The prerequisites for configuring DDL replication are as follows:

  • DDL replication is supported for MySQL 5.7.

  • Remote capture for MySQL 5.7 doesn’t support DDL replication.

  • Oracle GoldenGate DDL replication uses two plug-ins as a shared library, ddl_rewriter and ddl_metadata, which must be installed on your MySQL server before Oracle GoldenGate replication starts.

  • The standalone application, Oracle GoldenGate metadata_server, must be running to capture the DDL metadata.

  • The history table under the new oggddl database (oggddl.history). This metadata history table is used to store and retrieve the DDL metadata history. The history table records must be ignored from being logged into the binary log so you must specify  binlog-ignore-db=oggddl in the my.cnf file.

  • You should not manually drop the oggddl database or the history table because all DDL statements that run after this event will be lost.

  • You should not stop the metadata_server during DDL capture as all the DDL statements that run after this event will be lost.

  • You should not manually remove the ddl_rewriter and the ddl_metadata plugins during DDL capture because all DDL statements that run after this event will be lost.

  • DDL executed within the stored procedure is not supported. For example , a DDL executed as in the following is not supported. 

    CREATE PROCEDURE atssrc.generate_data() 
    BEGIN 
    DECLARE i INT DEFAULT 0; 
    WHILE i < 800 DO 
    SET i = i + 1; 
    IF (i = 100) then 
    alter table atssrc.`ddl6` add col2 DATE after id; 
    ELSEIF (i = 200) then 
    alter table atssrc.`ddl6` add col3 DATETIME after datetime; 
    ELSEIF (i = 300) then 
    alter table atssrc.`ddl6` add `col4` timestamp NULL DEFAULT NULL after 
    channel; 
    ELSEIF (i = 400) then 
    alter table atssrc.`ddl6` add col5 YEAR after value; 
    END IF; 
    END WHILE; 
    END$$ 
    DELIMITER ; 
    call atssrc.generate_data();
  • By design, the heartbeat table DDLs are ignored by the Extract and you should create the heartbeat tables manually at the target.