Using BulkInsert with Mirroring Replications

Prev Next

Note

The BulkInsert option is not applicable if the target table includes triggers in execution. Executing those triggers can create a performance degradation for replications using Bulk Mirroring. For this scenario, the replication mode must be set to Single Insert.

When replicating using mirroring mode (transactional replications) to Oracle, MySQL, SQL Server, SQL Azure, and PostgreSQL targets, you can set up a  bulk insert option to enhance performance. This feature inserts blocks of records rather than single records. The size of each block can be adjusted for optimal performance.

To configure bulk insert:

  1. Create the target connection using the Add Target Connection  wizard in the Metadata Explorer.

  2. In the Metadata Explorer, select the required connection.

  3. Right-click the menu and click Connection Properties.

  4. In the Connection Properties dialog box, scroll down to the Mirroring Options section.

  5. Set the Default Mirroring Insert Mode value to BulkInsert.

  6. Set the Default Mirroring Block Size value to the required number of rows to insert in a single operation. The value you choose depends on your environment and you may need to adjust the value when testing replication performance. Note that the default setting can be overridden using the Replication Properties for a specific replication.

Note

If you are using MySQL Connector 8.0 or above, set the AllowLoadLocalInfile property to True in the connection string. The default value is False and this value prevents bulk operations from succeeding.