AlwaysOn Configuration - Enable AlwaysOn
Launch sql server configuration manager.
Browse to the service called SQL Server (MSSQLSERVER) > Right Click > Properties
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
Connect to the first Node
Press the connect () icon and connect to the second (or however many nodes there are).
This displays all nodes have been added to the console.
Here I created 3 sample databases. But in a live environment, this will be whatever you want it to be.
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