In this scenario we are going to build a two node SQL Server 2012 AlwaysOn cluster. To achieve this, all of the nodes that are going to participate in the SQL Server AlwaysOn Cluster need to have the .NET Framework 3.5.1 feature and the Failover Clustering feature enabled.
Now that we have enabled both of these features we can build our Windows Server Failover Cluster (WSFC). From the Control Panel | Administrative Tools | Failover Cluster Manager | Validate a Configuration, we can validate whether our serves are ok to participate in a WSFC.
The ‘Validate a Cluster Configuration’ Wizard will start. Click through this wizard and you will be asked which tests you would like to run. I have selected all tests for this validation. You will need to add all of the nodes that you are going to add to your WSFC.
At the end of the Validation as long as everything has passed you should get the following notification:
Building your Windows Server Failover Cluster
There is no difference in building your WSFC for use with SQL Server 2012 AlwaysOn compared to your previously built WSFC for SQL Server 2008 R2. If you have never built a WSFC before you can read more on this here – Failover Cluster Step-By-Step Guide. In this blog post I am not going to go through the WSFC build, but remembering that your WSFC build needs to pass all of the validation rules giving you a supported WSFC.
SQL Server 2012 Setup
Now that we have our two nodes in our WSFC we are ready to start the build process for our SQL Server 2012 AlwaysOn Cluster. We need to make sure that we have our installation media which is available for download from Microsoft SQL Server 2012 Downloads.
On Node1 we start the setup.exe to begin the installation process. We are greeted with the initial screen which you navigate to the Installation Tab to start the installation, selecting ‘New SQL Server stand-alone installation or add features to an existing installation’.
The Setup Rules should all complete successfully and click ‘OK’ to continue. Once your Product Update scan has completed click ‘Next’.
Follow the prompts until you get to the Installation Type screen, Ensure you select ‘Perform a new Installation of SQL Server 2012‘, click ‘Next’.
Enter your product key, click ‘Next’.
Accept the Terms and Conditions, click ‘Next’.
Ensure you select ‘SQL Server Feature Installation’, click ‘Next’.
Choose the features you need to install, click ‘Next’.
Your installation rules will be checked and as long as there are no issues you can continue with the installation by clicking ‘Next’.
Enter your SQL Server 2012 Instance Name for the Instance that you are building. click ‘Next’.
Normally I would recommend having different service accounts for each of your SQL Services that you are installing. However, in this installation I am just using the default local accounts. You will need to have your Domain service accounts created and set the passwords on this Server Configuration screen in the installation. Once you have set the passwords, make sure you click on the Collation Tab to configure your Collation for the Instance. click ‘Next’.
On the Database Engine Configuration screen there are three tabs that we need to pay attention to. The Server Configuration Tab is where you set your security mode – Either Windows (recommended) or Mixed Mode. Remember to add the current account you are running the installation as, as well as any other individuals or groups that need to be members of the SysAdmins group.
The Data Directories Tab allows you to specify where you want to have your User Databases, TempDB and backup locations to be stored. Traditionally you would have four separate drive locations depending on your storage for Data files, Log Files, TempDB and Backups.
The FileStream Tab allows you to Enable Filestream if this is a required option that you need in your environment. Click on the link for further reading on FileStream.
Click ‘Next’. Until you get to the Ready to Install screen. At this point in time you should review what is going to be installed and if you are happy then Click the Install button.
Remember these same steps need to be completed on your second node that you are including into your SQL Server 2012 AlwaysOn Cluster.
Configuring SQL Server 2012
Now that we have installed two stand alone instances of SQL Server 2012 on our two servers in the WSFC we need to undertake some post installation configurations. This is achieved by using the SQL Server Configuration Manager which is available from Start | All Programs | Microsoft SQL Server 2012 | Configuration Tools.
Because the data transfers by SQL Server 2012 AlwaysOn are via TCP/IP we need to enable this in the Network Configuration Protocols. By default this will be disabled. Change the value to Enabled and click ‘OK’.
We are now at the main point with configuring our SQL Server 2012 AlwaysOn Cluster. Previously we were creating a Clustered SQL Server Instance and we had to undertake the Clustered Build Option. You will have noticed that we have installed stand alone instances of SQL Server on each of the nodes participating in the WSFC. We need to enable AlwaysOn Availability Groups. In the SQL Server Configuration Manager select the Instance of SQL Server, right click, Select Properties. On the AlwaysOn High Availability Tab tick the ‘Enable AlwaysOn Availability Groups’ check box.
Click ‘OK’. The changes will not take effect until the Instance is restarted. You will need to repeat this step on the second instance we installed. (This will need to be done on every instance in your SQL Server 2012 AlwaysOn Cluster)
We are now ready to start configuring our Availability Groups. To read more on how to do this have a look at SQL Server 2012 AlwaysOn : Availability Groups.