DDL 複製 - MySQL
瞭解 MySQL 中的 DDL 複製。
MySQL 中的 DDL 複製限制
-
案例 1:如果已啟用 DDL 或
TRACKSCHEMACHANGES,且表格位於擷取清單中。擷取異常中止,但發生下列錯誤:DDL statement "CREATE TABLE AS SELECT" is detected for table '*table-name*' at binary log number '*binlog number*' and offset 'binlog offset'. The DDL operation "CREATE TABLE AS SELECT" is not supported. Execute all 'CREATE TABLE AS SELECT' DDL operations manually to the target database and start Extract by adding Extract parameter TRANLOGOPTIONS WARNCREATEASSELECT. Once Extract gets past the 'CREATE TABLE AS SELECT' operation, restart Extract after disabling the parameter TRANLOGOPTIONS WARNCREATEASSELECT.您必須依照錯誤訊息中的建議執行動作。
在 Extract 參數檔中使用
TRANLOGOPTIONS WARNCREATEASSELECT參數時,Extract 會在 Extract 報表中發出下列警告訊息之後繼續,以供後續的'CREATE TABLE AS SELECT'作業使用。"DDL statement 'CREATE TABLE AS SELECT' is detected for table '*table-name*' at binary log number '*binlog number*' and offset '*binlog offset*'. The DDL operation 'CREATE TABLE AS SELECT' is not supported. The DDL and the associated DMLs are ignored." -
案例 2:停用 DDL 複製或
TRACKSCHEMACHANGES,且表格位於「擷取」清單中時。When both DDL replication / TRACKSCHEMACHANGES are not enabled in the capture, the DDL and associated DML operations with CREATE TABLE AS SELECT are ignored. User needs to issue the same "CREATE TABLE AS SELECT" in the target as it was issued in the source.
注意:請參閱 Oracle GoldenGate 的參數與函數參照中的 TRANLOGOPTIONS WARNCREATEASSELECT 瞭解詳細資訊。