re-Index with alwaysOn availability groups

  • We have multiple SQL 2012 SQL servers setup in an alwaysOn availability groups. Where should we schedule the re-index? We have Server1 as the primary and 2 secondaries Server2 and Server3. Are their any tricks to have it run on which ever one is the primary?

  • I recommend using the Ola Hallengren's SQL maintenance solution as it is very robust and will let you configure when to reorg or rebuild indexes. I believe the script will only do index maintenance on the Primary replica. Moreover, for DBCC CHECKDB with AlwaysOn, you should run it on both replicas (Primary and Secondary), not just the Primary because your backups are taking on the secondary replica.

    https://ola.hallengren.com/

    Cheers!

  • reindex operations will run against the primary and would be replayed on the secondarys

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

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

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