Use dsi_compile_enable to enable HVAR for the connection to the replicate database.
If you set dsi_compile_enable off, Replication Server uses continuous log-order, row-by-row replication mode. For example, set dsi_compile_enable off for an affected table if replicating net-row changes causes problems, such as when there is a trigger on the table that requires all operations on the table to be replicated in log order, and therefore compilation is not allowed.
To enable and configure HVAR at the database level to affect only the specified database, enter:
alter connection to data_server.database set dsi_compile_enable to ‘on’ go
You can also enable and configure HVAR at the server or table levels.
Server level – affects all database connections to Replication Server:
configure replication server 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, 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 example:
alter connection to data_server.database for replicate table named dbo.table_name 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.
After you execute dsi_compile_enable, suspend and resume the connection to the replicate database.