Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


rebuild clustered index in transactional replication


rebuild clustered index in transactional replication

Author
Message
KATHLEEN Y ZHANG
KATHLEEN Y ZHANG
SSC-Enthusiastic
SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)

Group: General Forum Members
Points: 178 Visits: 584
Hi, I am planning to run a script to rebuild highly fragmented clustered indexes on tables in transactional replication. Is there any caveat anyone know of? I read something a while ago saying that rebuilding clustered indexes on the publisher will actually move(like doing a delete and insert) rows in the published table around. Also, do I need to run the script on both the publisher and subscriber (not need to run the clustered rebuild, but do need to run the script for nonclustered indexes on the subscriber)?
Steve Jones
Steve Jones
SSC-Dedicated
SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)SSC-Dedicated (36K reputation)

Group: Administrators
Points: 36106 Visits: 18740
I think the index command gets replicated, so the subscribers will rebuild indexes as well. Shouldn't hurt, but you should be aware the subscribers will run this.

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
KATHLEEN Y ZHANG
KATHLEEN Y ZHANG
SSC-Enthusiastic
SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)SSC-Enthusiastic (178 reputation)

Group: General Forum Members
Points: 178 Visits: 584
Thanks Steve!

I ran some test on a table that gets replicated together with its clustered index and nonclustered indexes. When I ran index rebuild on the clustered index on the publisher, I noticed through replication monitor a message saying 'xxxxx commands were delivered', so I checked the fragmentation statistics, the fragmentation percentage was reduced on the publisher, but remained unchanged on the subscriber. Then I ran the same command on the subscriber, its fragmentation was reduced. I am not exactly sure what 'xxxxx commands were delivered' does though.
AK1516
AK1516
SSC-Enthusiastic
SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)SSC-Enthusiastic (137 reputation)

Group: General Forum Members
Points: 137 Visits: 1018
Hey Steve,

I am a step ahead of our friend.We have data moved from one data file to another.This is nearly 900gb in size.We have transactional replication setup with push subscription.

Now after i moved the data the log file grew as expected because I have used drop existing = on when I moved the data of clustered indexed tables.

The log reader agent started performing bad and is not delivering the transactions any more and I am not able to shrink the t - log even after 2 full backups.

The db size is 3.5 tb and log size grew from 100gig to 780.

sql server enterprise 2008 sp3 on windows server 2008 r2.

Any help would be appreciated .......
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search