none
ok to alter the maxsize on a datafile when database in a High Availability Group?

    Question

  • I'm running SQL Server 2012 with High Availability Groups.  I have a database in the HA Group that has multiple datafiles spread across multiple volumes.  One of the volumes is getting low on storage so I would like to limit the growth of one of the datafiles on that volume.  I tried this in my test HA database cluster and it seemed to work fine.  I changed the maxsize of a datafile, and then failed over the Availability Group to the secondary node and looked at the properties on the data file on the secondary (new primary) node.  The maxsize reflected the same maxsize setting.  Appears the alter database statements are logged and sent to the secondary replica.  Just wanted to check to make sure this is ok to do before I try this in production.  Anyone have any experience with altering database and datafile properties of a database that is participating in a Availability Group?

    Thanks in advance for any advice!


    • Edited by mikea730 Saturday, March 15, 2014 7:58 AM
    Saturday, March 15, 2014 7:50 AM

Answers

  • Mike,

    You should be fine - it works very similar to how mirroring does (if you've had any experience with that). You can do this, just be aware that altering files (just as it is in mirroring) where other replicas don't have the exact same setup (e.g. drive letters are different) it could cause issues and bring the replicas down. Since you're just limiting the filesize, you're perfectly good to go.


    Sean Gallardy | Blog | Twitter

    • Marked as answer by mikea730 Monday, March 17, 2014 5:46 PM
    Sunday, March 16, 2014 5:50 AM

All replies

  • Mike,

    You should be fine - it works very similar to how mirroring does (if you've had any experience with that). You can do this, just be aware that altering files (just as it is in mirroring) where other replicas don't have the exact same setup (e.g. drive letters are different) it could cause issues and bring the replicas down. Since you're just limiting the filesize, you're perfectly good to go.


    Sean Gallardy | Blog | Twitter

    • Marked as answer by mikea730 Monday, March 17, 2014 5:46 PM
    Sunday, March 16, 2014 5:50 AM
  • Great!  Thanks for the verification!
    Monday, March 17, 2014 5:46 PM