Introduction
The addition of AlwaysOn in SQL Server2012 is a new, increased availability solution. Prior to AlwaysOn, SQL Server already had high availability and data recovery scenarios such as database mirroring, log shipping, and failover clustering. All have their own limitations. AlwaysOn, as Microsoft's new solution, extracts the benefits of database mirroring and failover clustering. This article is intended to demonstrate AlwaysOn by implementing an AlwaysOn instance.
Configure AlwaysOn
Although AlwaysOn compared the previous version of the failover cluster, the steps have been simplified a lot. But configuring AlwaysOn is still a hassle, not only to be familiar with SQL Server, but also to know about Windows Server. This article configures AlwaysOn to be divided into two sections: Configure Windows and configure SQL Server.
Before you begin to configure Windows, let's start with a brief introduction to the test environment.
I've built three Windows Server 2008 virtual machines (SQL Server 2012 is a hassle and must be installed on Windows Server SP2 or above), as shown in 1. The Active Directory and DNS server are in Windows SERVER2008 server 1. No DHCP server is enabled, and the IP of the three servers is 192.168.100.1/24,192.168.100.2/ 24,192.168.100.3/24.
Figure 1: Three Test virtual machines with Windows Server2008
Three servers are joined by Windows Server Server1 as the ad-established domain sql2012.test. The names of the three virtual machines are sqlservertest1,sqlservertest2,sqlservertest3 respectively.
Configure Windows Server
The first is the ability to install the failover cluster on the three test servers, respectively, as shown in 2.
Figure 2: The ability to install a failover cluster on a test server
After installing the failover cluster functionality, configure the cluster on Server1.3.
Figure 3: Creating a cluster in failover cluster management
Then in the next step, add three servers to the cluster, as shown in 4.
Figure 4 Adding three test servers to the cluster
Click Next to test, as shown in 5.
Figure 5: Test the cluster for validation
Click Next to add the cluster name, as shown in 6.
Figure 6: Add cluster IP and cluster name
Then click Next to confirm, and finally complete the creation of the cluster, as shown in 7.
Figure 7: Completing the creation of the cluster
Configuring SQL Server
After you have configured Windows Server, it is time to configure SQL Server. Install SQL Server 2012 on each of the three test machines, as shown in feature 8 installed.
Figure 8. Features of SQL Server 2012 installation
After you install SQL Server 2012, run SQL Server Configuration Manager, as shown in 9.
Figure 9. Running SQL Server Configuration Manager
The AlwaysOn option is then turned on in the SQL Server instance, as shown in 10.
Figure 10. Turn on AlwaysOn
AlwaysOn attempts in SQL Server 2012