Creting new indexes and index maintenance on replicated database

  • We have transactional replication of several databases. Version 2008 R2 Ent. Due to large database sizes, replication was initially setup using backup/restore method. Subscriber databases mainly used for reporting purposes. It is one-way replication.

    All our tables are subscribed for publication. And we have a script to run when we need to add newly created table to replication. This script creates an article on the table, its subscription, and starts a snapshot job.

    However we have two problems:

    1. We cannot replicate creation of new index to subscriber. What is best practice in such a case? To script them from publisher and manually apply them to subscriber? And how to find missing indexes from subscriber?

    2. It looks like when we perform defragmentation job on publisher, this process is not replicated to subscriber either. Indexes on subscriber side stay highly fragmented. Should we create a job on subscriber as well, that independently run from publisher?

    Or we are missing some fundamental features in both of these cases?

    Thanks

  • Indexes have to be scripted manually from publisher to subscriber. Maybe a powershell script could help you.

    Index maintenance has to be run on both publisher and subscriber.

    -- Gianluca Sartori

  • Thanks, Gianluca. I suspected this.

    BTW, I liked your site.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply