3

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!

Restoring a SQL Server 2012 database in high availability

3

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];
  • So for further clarification: – Christina Altman Mar 13 '15 at 14:54
  • I am still a bit confused. The thread I originally referenced says to do the following: * Remove from Availability Group * Restore with NORECOVERY on the primary AND secondary nodes * Add database to Availability Group on secondary only What I am still wondering is if you have to add the database back to the Availability Group on only the secondary, or also on the primary – Christina Altman Mar 13 '15 at 15:01
  • I think you need to clarify which database you are restoring. Are you restoring the primary or are you restoring a secondary, or both? – Your_comment_is_not_funny Mar 13 '15 at 16:36
  • I guess I'm wondering the process for either situation. I am in charge of creating process documentation for both scenarios, but am unfamiliar with it. – Christina Altman Mar 16 '15 at 15:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.