DDLレプリケーション- MySQL
MySQLでのDDLレプリケーションについて学習します。
MySQLでのDDLレプリケーションの制限
-
ケース1: DDLまたは
TRACKSCHEMACHANGESが有効で、表が取得リストにある場合。Extractは次のエラーで異常終了します。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が使用されている場合、後続の'CREATE TABLE AS SELECT'操作が見つかった場合、Extractレポートで次の警告メッセージを発行した後もExtractは続行されます。"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が無効で、表がExtractリストにある場合。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を参照してください。