sp_setrepcol now includes a use_index parameter.
sp_setrepcol <tab_name> [, column_name] [, do_not_replicate | replicate_if_change | always_replicate] [, use_index]
use_index – creates an index for replication on the text or image columns.
Creates an index for replication on the t column:
create table t1 (c int, t text, i image) go sp_setreptable t1, true go sp_setrepcol t1, t, replicate_if_changed, use_index go
The order of the precedence on the index status is column, then table, then database.
If the database is set to use indexes, but the object is marked to not use them, the object status overrides the database status. For example, in a database marked for replication using indexes, the table’s status overrides the index status. Similarly, if you set a table to use the indexes, some columns may not use the indexes.