January 15, 2020 at 8:52 am
What is the process for restoring a database that is part of Distributed Availability Group?
January 15, 2020 at 11:09 am
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
January 16, 2020 at 10:06 am
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.
January 16, 2020 at 10:15 am
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
January 16, 2020 at 3:30 pm
I was running it on the primary replica.
Seems like a bug as it works using the GUI
January 22, 2020 at 6:11 am
Can you script out the action from the GUI and see if it is running the same commands your script was running?
January 22, 2020 at 3:10 pm
Yes it works when you script it
January 22, 2020 at 3:13 pm
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