Setting up bulk copy-in

These database connection parameters control bulk operations in DSI:

Parameter

Description

dsi_bulk_copy

Turns the bulk copy-in feature on or off for a connection. If dynamic_sql and dsi_bulk_copy are both on, DSI applies bulk copy-in. Dynamic SQL is used if bulk copy-in is not used.

Default: off.

dsi_bulk_threshold

The number of consecutive insert commands in a transaction that, when reached, triggers Replication Server to use bulk copy-in. When Stable Queue Transaction (SQT) encounters a large batch of insert commands, it retains in memory the number of insert commands specified to decide whether to apply bulk copy-in. Because these commands are held in memory, Sybase suggests that you do not configure this value much higher than the configuration value for dsi_large_xact_size.

Minimum: 1

Default: 20

To set the values of dsi_bulk_copy and dsi_bulk_threshold, use:

To check the values of dsi_bulk_copy and dsi_bulk_threshold, use admin config.

When dsi_bulk_copy is on, SQT counts the number of consecutive insert statements on the same table that a transaction contains. If this number reaches the dsi_bulk_threshold, DSI:

  1. Bulk copies the data to Adaptive Server until DSI reaches a command that is not insert or that belongs to a different replicate table.

  2. Continues with the rest of the commands in the transaction.

Adaptive Server sends the result of bulk copy-in at the end of the bulk operation, when it is successful, or at the point of failure.

NoteThe DSI implementation of bulk copy-in supports multistatement transactions, allowing DSI to perform bulk copy-in even if a transaction contains commands that are not part of the bulk copy.