I located an extremely helpful process outlined in the thread below, but needed some clarification. This may be a silly question, but I'm a bit new to Availability Groups. In the steps outlined in the thread's answer, is it true that after restoring, you only have to add the newly restored database into the secondary? Will it appear back into the primary automatically? Thank you for any assistance!
Yes, you need to populate databases on secondary nodes in an availability group yourself, they do not appear "automatically". The full documentation is found on MSDN, with multiple ways to execute. The short version is:
- Your primary database needs to be in FULL recovery mode.
- You must restore the database in NORECOVERY mode on the secondary node. Logs must be applied so that the secondary database is as close to the current transaction state of the primary as possible.
- Once you have done this, you need to join the secondary database to the availability group:
ALTER DATABASE [foo] SET HADR AVAILABILITY GROUP = [bar];