HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

Will transactional replication push a CREATE INDEX immediately? Or do I need a snapshot?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
createtransactionalneedreplicationsnapshotpushwillindeximmediately

Problem

I have transactional replication set up on SQL 2008, and the article in question has "Copy nonclustered Indexes" set to TRUE.

If I add a non-clustered index on the publisher (using CREATE INDEX), will that push to the subscriber immediately?

Or do I need to run a snapshot?

Solution

You'll have to push it to the subscriber yourself. "Copy..." only applies to the snapshot.

From MSDN : Frequently Asked Questions for Replication Administrators

How do I add or change indexes on publication and subscription databases?

Indexes can be added at the Publisher or Subscribers with no special considerations 
for replication (be aware that indexes can affect performance). CREATE INDEX and ALTER
INDEX are not replicated, so if you add or change an index at, for example, the Publisher,
you must make the same addition or change at the Subscriber if you want it reflected there.

Code Snippets

How do I add or change indexes on publication and subscription databases?

Indexes can be added at the Publisher or Subscribers with no special considerations 
for replication (be aware that indexes can affect performance). CREATE INDEX and ALTER
INDEX are not replicated, so if you add or change an index at, for example, the Publisher,
you must make the same addition or change at the Subscriber if you want it reflected there.

Context

StackExchange Database Administrators Q#5547, answer score: 9

Revisions (0)

No revisions yet.