4

I have a Geo-Replicated Azure SQL Database which has some serious index fragmentation and outdated statistics.

An attempt to REORGANIZE or REBUILD an index, or to UPDATE STATISTICS results in the message "Failed to update database xxx because the database is read-only." however a quick check against sys.databases shows that the database is in fact not in READ_ONLY mode.

Understandably Azure manages the database as it is a geo-replicated copy, so my question is that if I request that Indexes and Statistics updates are implemented on the MASTER copy, whether my replicated copy will receive same, or is there a way to update on my replicated copy alone?

Evandro de Paula
  • 2,532
  • 2
  • 18
  • 27
WilliamR
  • 97
  • 10

1 Answers1

3

All statements you run on the primary database to rebuild indexes and maintain statistics will also be executed on the secondary. For more information click here.

Alberto Morillo
  • 13,893
  • 2
  • 24
  • 30