February 17, 2023 at 4:30 pm
I can't help on AOAG because I've never had to use it. Once someone helps you figure that out, I can give you a very strong hint on how to defragment without ending up with a large amount of free space cause by the necessary REBUILDs.
As a bit of a sidebar, if you have large indexes that you need to rebuild on occasion, consider moving each one to its own separate file/filgroup and leave it there. The next time you need to rebuild it, create another new file/filegroup and do move using the "with drop existing" thing. Then drop the now empty file group and you won't have any large amounts of unwanted freespace in your database like you normally would. I simply refer to this method as a "Swap'n'Drop". It takes some custom coding but it is SO worth it for me especially when it comes to keeping the size down for test restores, necessary (and secure, to be sure) copies of prod, etc, etc.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing post 1 (of 2 total)
You must be logged in to reply to this topic. Login to reply