Use dsi_compile_enable to enable HVAR for the connection. If you set dsi_compile_enable to off, Replication Server uses continuous log-order, row- by-row replication mode. For example, set to ‘off’ for an affected table if replicating net row changes causes problems, such as when there is a trigger on the table which requires all the operations on that table to be replicated in log order, and therefore compilation is not allowed
When you set dsi_compile_enable, Replication Server disables dsi_cmd_prefetch and dsi_num_large_xact_threads.
You can also use:
dsi_compile_max_cmds to specify the maximum size of a group of transactions.
dsi_bulk_threshold to specify the number of net row change commands after compilation has occured on a table for a command type, that when reached, triggers Replication Server to use bulk copy-in on that table for the same command type.
dsi_command_convert to specify how to convert a replicate command.
HVAR sets dsi_dataserver_make to “ASE” by default to specify Adaptive Server as the replicate data server. HVAR automatically sets the Sybase recommended values for dsi_compile_max_cmds, dsi_bulk_threshold, and dsi_command_convert, as the default values. See “alter connection,” in Chapter 3, “Replication Server Commands” in the Replication Server Reference Manual for full descriptions of the parameters.
You can enable and configure HVAR at the server, database, or table-level. In these examples, tb1 is the table name and dbo is the table owner, in the pubs2 database of the replicate SYDNEY_DS data server:
Server-level – affects all database connections to Replication Server
configure replication server set dsi_compile_enable to ‘on’
Database-level – affects the specified database
alter connection to SYDNEY_DS.pubs2 set dsi_compile_enable to ‘on’
Table-level – affects only the replicate tables you specify. If you specify a parameter at both the table-level and database-level, the table-level parameter takes precedence over the database-level parameter. If you do not specify a table-level parameter by default, the setting for the parameter applies at the database-level. To set a parameter for a table, use alter connection and the for replicate table named clause:
for replicate table named [table_owner.]table_name [set table_param [to] ‘value’]]
For example:
alter connection to SYDNEY_DS.pubs2 for replicate table named dbo.tb1 set dsi_compile_enable to ‘on’
Using the for replicate table name clause alters connection configuration at the table level. The configuration changes apply to replicate data from all the subscriptions and all the replication definitions of the tables you specify.
You can only use the alter connection command for table-level configuration as Replication Server does not support the “for” clause with the create connection command.
After you execute dsi_compile_enable at the server, database, or table-level, suspend and resume the connection.
suspend connection to SYDNEY_DS.pubs2 go
Once the connection is suspended, you can resume it:
resume connection to SYDNEY_DS.pubs2 go