0

I am configuring transactional replication.

I have configured that and its working fine.

Now i want to copy all the non clustered indexes and covered indexes(NC Index) from publisher to subscriber.

Any approach followed by people to do that stuff with too much overhead.

Ayush Kalia
  • 31
  • 1
  • 7
  • You don't need to replicate indexes. You can create them manually without comprising replication (as long as you don't touch the primary key). This means your indexing strategy can best reflect the requirements of the subscription server i.e. reporting. – pacreely Feb 24 '17 at 08:58
  • Sorry type-o. Compromising. – pacreely Feb 24 '17 at 09:00

1 Answers1

0

You can have replication take care of this automatically for you when you create a table article. As long as whatever value you're specifying for @schema_option in the call to sp_addarticle contains 0x40, the snapshot script will contain the relevant create index statements.

That said, for existing articles, the comment on the question made by @pacreely is completely correct; as long as you don't touch the primary key, you can pretty much do whatever you want. That is, if you're doing replication to support a reporting workload, you can add indexes only to your subscribed database and not have to add them to your published database.

Ben Thul
  • 31,080
  • 4
  • 45
  • 68