Install and configure SQL AlwaysON AG with Listener on Azure

AlwaysOn Configuration - Enable AlwaysOn

Launch sql server configuration manager.
enable_always_on_step_1
Browse to the service called SQL Server (MSSQLSERVER) > Right Click > Properties
enable_always_on_step_2

Click on AlwaysOn High Availability, click on the checkbox that says Enable AlwaysOn Availability Groups and enter a Windows failover cluster name. Click OK to close.

Browse to the service called SQL Server (MSSQLSERVER) > Right Click > restart.

Configure AlwaysON

Always on has 3 different ways of adding databases. Full, Join and Skip sync
I suggest performing this step logged in as the service account. That way, all tasks get performed with elevated privelages
Connect to Node A, Launch SQL Server Management Studio
enable_always_on_step_3
Connect to the first Node
enable_always_on_step_4
Press the connect (always_on_icon) icon and connect to the second (or however many nodes there are).
enable_always_on_step_5
This displays all nodes have been added to the console.
enable_always_on_step_6
Here I created 3 sample databases. But in a live environment, this will be whatever you want it to be.
enable_always_on_step_7
We need to backup the databases first. AlwaysON won’t be able to add a database without it.
The script below will help you with that.

BACKUP DATABASE [DB Name Here] 
TO  DISK = N'L:\SQLBackup\DB Name Here.bak' 
WITH NOFORMAT, NOINIT,  NAME = N'DB Name Here-Full Database Backup',
SKIP, NOREWIND, NOUNLOAD,  STATS = 10
GO

Leave a Reply

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

*
*