I have below scenario where i need your help:
I have configured the AlwaysOn High Availability on my server. I have two replicas. Now I have requirement to make one database offline from the primary replica and make it online after some time.
So what happens in this scenario in background?
After making the database from primary replica online, the database from the secondary replica goes into restoring state. And we need to always manually delete the database from secondary server and remove it from AG group and add it again to both in sync again.
Is there any solution for this? If not are there any steps to do the above task from code?