Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

rebuild clustered index in transactional replication Expand / Collapse
Author
Message
Posted Tuesday, April 29, 2008 2:54 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, September 9, 2014 6:20 AM
Points: 178, Visits: 510
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)?
Post #492505
Posted Tuesday, April 29, 2008 3:41 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: 2 days ago @ 12:34 PM
Points: 31,181, Visits: 15,626
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
Post #492516
Posted Wednesday, April 30, 2008 9:54 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, September 9, 2014 6:20 AM
Points: 178, Visits: 510
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.
Post #493094
Posted Monday, November 26, 2012 9:07 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, October 6, 2014 8:21 AM
Points: 132, Visits: 911
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 .......
Post #1388674
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse