Restoring a database that is part of Distributed Availability Group

  • What is the process for restoring a database that is part of Distributed Availability Group?

     

  • I think it involves removing the database from the availability group before restoring and adding it back in afterwards.  As for the exact process, I'd have to do a search for that.  I'll leave that part to you.

    John

  • That doesn't work.

    When I try adding the database back I get the following message

    Database 'TEST' cannot be joined to or unjoined from availability group 'TEST-AG'. This operation is not supported on the primary replica of the availability group.

  • What doesn't work?  What process are you following?  The error message says that the operation isn't supported on the primary replica, so run it on a node that isn't the primary replica.

    John

  • I was running it on the primary replica.

    Seems like a bug as it works using the GUI

  • Can you script out the action from the GUI and see if it is running the same commands your script was running?

  • Yes it works when you script it

  • I imagine that's because the script generated is a SQLCMD script that includes commands to make sure each statement is run against the correct server.  When you did it manually, you ran it on the primary replica, and got an error saying the operation isn't supported on the primary replica.

    John

Viewing 8 posts - 1 through 7 (of 7 total)

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