Replicação de DDL - MySQL
Saiba mais sobre a replicação de DDL em MySQL.
Limitação da Replicação DDL em MySQL
-
Caso 1: Se a DDL ou o
TRACKSCHEMACHANGESestiver ativado e a tabela estiver na lista de captura. Extract é encerrado com o seguinte erro: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.É necessário executar ações conforme sugerido na mensagem de erro.
Quando o parâmetro
TRANLOGOPTIONS WARNCREATEASSELECTé usado no arquivo de parâmetros Extract, o Extract continua após a emissão da seguinte mensagem de advertência no relatório Extract, no caso de uma operação'CREATE TABLE AS SELECT'subsequente ser encontrada."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." -
Caso 2: Quando a replicação de DDL ou
TRACKSCHEMACHANGESestá desativada e a tabela está na lista 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.
Observação: Consulte TRANLOGOPTIONS WARNCREATEASSELECT na Referência de Parâmetros e Funções do Oracle GoldenGate para obter detalhes.