SQL Always On - Directory where the database is stored in the replica

Salves 501 Reputation points
2020-09-10T00:39:23.367+00:00

Hi,

when I add the replicate servers to my SQL Always On AG, I don't see an option to choose where the databases will be stored. I believe that it creates the replicated bases according to the default configuration of my SQL database.

However, if I want to change the directory of a base that will be replicated in my replica, can I do this after the added replica? Or how to configure this location configuration during configuration?

Thank you.

SQL Server Other
{count} votes

1 answer

Sort by: Most helpful
  1. Cris Zhan-MSFT 6,661 Reputation points
    2020-09-10T02:47:49.907+00:00

    Hi @Salves ,

    You can choose to restore the availability group database on the new replica SQL instance and specify the directory location. Then select "Join Only" ,when adding the replica to exsiting AG and initializing the database .

    Or after adding the replica, suspend data movement then remove the database from Availability Group, change the file location, then rejoin the database to Availability Group. More details you can refer to this article.


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.