Install and configure SQL AlwaysON AG with Listener on Azure

AlwaysOn Configuration - Initial Creation - Join

As we already have an Availability group, we don’t need to create one. We just need to restore a database. This can also be done from any of the replica nodes
enable_always_on_step_19
Right click Databases > Restore Database
enable_always_on_step_20
Click Device and the browse button.
enable_always_on_step_21
Click Add
enable_always_on_step_22
Add the UNC path for the filename. Click OK
enable_always_on_step_23
Click OK
enable_always_on_step_24
The information has been populated
enable_always_on_step_25
Click on Options and make sure RESTORE WITH NORECOVERY has been selected as the Recovery State
enable_always_on_step_26
Click on OK to restore. Click on OK to complete.
enable_always_on_step_27
Here you can see the restored database is sitting in a restoring state. (Restoring…). This allows us to still edit and or make changes to the database.

Now we need to add the database to the Availability Group.
enable_always_on_step_28
Right click the Availability group previously created. Click on Add Database
enable_always_on_step_29
Skip this page, click Next
enable_always_on_step_30
Select the database you restored. Click Next
enable_always_on_step_31
Click on Join Only. Click Next
enable_always_on_step_32
We need to connect to all secondary replicas. Click on Connect
enable_always_on_step_33

Enter the server you wish to connect to. Click Connect
enable_always_on_step_35
Click Next
enable_always_on_step_36
A Validation runs. If there are no errors, click Next
enable_always_on_step_37
Here you can export the script. If you want multiple Availability groups, it might just be quicker to script the process. Click Next

enable_always_on_step_38
Once that has completed. Click Close.
enable_always_on_step_39
The databases now reside on both all nodes and display (Synchronised)

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*