Welcome to Dirteam.com/ActiveDir.org Blogs Sign in | Join | Help

Sergio's Shack

A blog about the everyday life of an UC-administrator.
Installing a Sharepoint 2013 HA environment from scratch...Part 2

Introduction

In my previous blogpost I had the opportunity to share my thoughts about setting up a Microsoft SQL 2012 Server AlwaysOn Availability group. I will continue with explaining the steps that you need to perform in order to have your first AlwaysOn Availability group up and running in a matter of 45 minutes. It took myself 2 hours of reading and troubleshooting, before I had a working AlwaysOn Availability group.

Our ultimate goal is to see the wizard complete successfully.

SQL_AG_Final

I assume that you have a working Active Directory infrastructure, before proceeding. Without an Active Directory in place, it will be almost impossible to setup the Windows Server Failover Cluster environment.

Part One – Networking

All the Microsoft SQL 2012 Enterprise servers that are going to be participating in the AlwaysOn group, must reside in the same subnet as by Microsoft recommendations. As long as every server can ping each other , you will be fine and the AlwaysOn group will work.

You don’t need a special “clustering network or vlan” in your networking infrastructure.

 

Part two – Install Windows Server Failover Cluster role

I will provide a step-by-step procedure on how to setup the Windows Server Failover Cluster Role.

1) On the central Server Manager Dashboard, you click the Manage button and select “Add Roles and Features’’

Setup_WSFC_1

2) You will be presented with this screen

Setup_WSFC_2

Select: Role-based or feature-based installation and press “Next”

3) You have to select the destination server that will host the the Windows Server Failover Cluster Role

Setup_WSFC_3

After selecting the first server, continue to the next screen by pressing “Next”

4) Select the Application Server role and press “Next”

Setup_WSFC_4

5) Put a checkmark on the Failover Clustering Feature. Extra Roles and Features will be installed (click on Add Features). After that you can continue by clicking on the next button.

Setup_WSFC_5

Setup_WSFC_6

Setup_WSFC_7

Setup_WSFC_8

Setup_WSFC_9

Windows 2012 will proceed to install the required binaries on the first server. It will take around 5 minutes to complete.

Remember: Each server that will be part of the Microsoft SQL Server AlwaysOn group must have the Windows Server Failover Cluster Role installed.

E.g: If you are planning to have two Microsoft SQL 2012 Servers with the AlwaysOn feature, you have to repeat the procedure above twice.

Setup_WSFC_10

There you go. You have installed the Windows Server Failover Cluster role successfully.

 

Part three – Configuring the Windows Server Failover Cluster

To configure the Windows Server Failover Cluster, I want to redirect you to this amazing blogpost, that helped me a lot during my own installation of the Microsoft SQL Server 2012 AlwaysOn group.

http://blogs.technet.com/b/canitpro/archive/2013/08/20/step-by-step-creating-a-sql-server-2012-alwayson-availability-group.aspx

The blogpost above describes vividly how to setup an AlwaysOn Availability group.

What I will do in this part is explain, some pitfalls that I encountered myself. It will save you, the reader, a lot of troubleshooting and headaches. I will also

I begin with the most important technet article that you need to read thoroughly:

http://technet.microsoft.com/en-us/library/cc731002%28v=ws.10%29.aspx

My personal tip for you: Make sure that the Cluster computer object, is allowed to create computer objects. Without this simple checkmark

IC195277

You will not succeed in creating your first AlwaysOn Availability group. The validation of the AlwaysOn Availability group will fail.

I will provide some screenshots on how to configure the computer object that represents the Windows Server Failover Cluster.

First I start with my Windows Server Failover Cluster Setup. The screenshots are in their correct order of execution (left to right, each row).

Create_Cluster_1Create_Cluster_2Create_Cluster_3Create_Cluster_4Create_Cluster_5Create_Cluster_6Create_Cluster_7

I have shown in 7 steps how the setup process is executed. The following computer objects can be seen in the Active Directory User and Computers management console:

Create_Cluster_8

Take notice of the computer objects. I will explain them now for your better understanding:

- WSFC1 is the first virtual machine that is hosting the Windows Server Failover Cluster role. In my previous blogpost, I have installed Microsoft SQL 2012 Server enterprise edition on this virtual machine.

- WSFC2 is the second virtual machine that is hosting the Windows Server Failover Cluster role. In my previous blogpost, I have installed Microsoft SQL 2012 Server enterprise edition on this virtual machine.

- SPCLUSTER is a virtual network name for our AlwaysOn Availability group and this computer object is a special one that needs some security editing.

Friendly reminder:

If you forget to give the Failover Cluster computer object (e.g.: SPCLUSTER in my case)  the needed security rights, you will not be able to successfully complete the AlwaysOn Availability group wizard. The wizard will abort all operations. I am saving you the headache and troubleshooting despair Hot smile

Part four – Setting up Active Directory computer object rights

Let’s continue with the most important change that you have to do in your Active Directory environment. You will be giving the Windows Server Failover computer object, one special permission (Create computer objects).

1) Open the Active Directory User and Computers management console

AD_rights_1

Right click on the “Computers’’ container and select “Properties”. The following window will appear:

AD_rights_2

Go to the “Security” tab and select “Advanced”

2) Click on “Add’’ and the following window will appear

AD_rights_3

You will be selecting and providing the following information:

Principal: The failover cluster computer object. In my case: SPCluster

Type: Allow

Applies to: This object and all descendant object

In my case it happens to be this

AD_rights_5

Friendly reminder:

Take notice of the high lightened Permission. I have selected “Create Computer objects”. This is the only permission that you need to give the failover cluster computer object.

When you are done, you can click on “OK” and then on “Apply” to close everything.

This concludes applying the correct permissions for the failover cluster computer object. I will now proceed activating the AlwaysOn Availability option in Microsoft SQL 2012 Server Enterprise Edition.

 

Part five – Enabling the AlwaysOn Availability option

I will be brief in this part. I want to redirect you to this blogpost:

http://blogs.technet.com/b/canitpro/archive/2013/08/20/step-by-step-creating-a-sql-server-2012-alwayson-availability-group.aspx

Scroll down to the section titled:

“Enable SQL Server 2012 AlwaysOn Availability Groups Feature”

and read the small instruction on how to activate the AlwaysOn Availability.

In my case:

SQl2012_setup_13

Please, do not forget to restart the SQL Server service as stated in the blogpost above.

Part six – Creating your first AlwaysOn Availability group

You have reached the end of this blogpost. If you have followed my steps correctly, you will be ready to create your first AlwaysOn Availabity group in SQL Server Management Studio. Let’s proceed.

1) Open SQL Server Management Studio and connect to the SQL Server instance that you created earlier.

2) In Object Exporer, expand the AlwaysOn High Availability folder.

3) Right-click on the Availability Groups folder and select the New Availability Group Wizard… option. This will launch the New Availability Group Wizard.

4) Read or skip the introduction page and click “Next”

5) Specify an Availability Group name. In my case I have used this convention: <Short application description><application version>AG is short for Availability Group. e.g. SP2013AG. SP2013AG stands for: <Sharepoint><2013><Availability group>.

SQl2012_setup_14

6) Select the databases that needs to reside in the Availability group. The databases have to be in Full recovery model prior to joining them in the Availability group. In my case I have created a temporary_seed database, that I will be using to create the Availability group. You will do this only when you are going to use Sharepoint 2013. Sharepoint 2013 (as with Sharepoint 2010) will provision all databases during the installation of Sharepoint.

SQl2012_setup_14b

Click “Next” and you will proceed to specify replica partners.

SQl2012_setup_14c

I will add my second Microsoft SQL 2012 Server as the replica partner. I do this by clicking on the “Add Replica” button. A connect window will appear. Here you connect to the second Microsoft SQL 2012 Enterprise Edition server.

SQl2012_setup_14d

7) Once you’ve selected all the correct options, you will be presented with this screen:

SQl2012_setup_14e

Pay attention on how I have configured the options:

SPSQL01 is the primary AlwaysOn server

SPSQL02 is the secondary AlwaysOn server.

Automatic failover is selected for both servers. I have checked this option, because the business requirements dictates that a failover must occur automatically without an administrator’s intervention. If this is not your case, then you can uncheck both options. But this defeats the purpose of AlwaysOn Sarcastic smile.

Synchronous Commit has been selected, because the business requirements dictates that no data must be lost in case of a disaster.

Readable Secondary has been activated. I have done this, to keep our Sharepoint 2013 farm online and serve content, in case of a disaster.

8) Proceed to the “Listener” tab and configure the Listener name and ip.

SQl2012_setup_14f

I have used this convention:

<Short application description><application version>_<LISTENER>.  e.g. SP2013_LISTENER. SP2013_LISTENER stands for: <Sharepoint><2013>_<LISTENER>.

Friendly reminder:

Remember to create the AlwaysOn Group listener DNS name in your internal DNS infrastructure. An A-record will suffice. The A-record must contain the following information:

- hostname e.g. SP2013_LISTENER

- IP Address it must resolve to: e.g 10.0.0.187

9) When you are happy with the settings in the “Replica” and “Listener” tab, click on “Next”.

10) Select the Data Synchronization method and select the “FULL” option. Point the wizard to a shared folder on your network accessible by all SQL 2012 Enterprise Edition servers. The SQL Server service account used by both replicas must have write permissions to this shared folder.

11) Proceed to the validation page, by clicking on “Next”. The Availability group wizard will run some checks on your whole setup and infrastructure.

SQl2012_setup_15

If you have followed my steps correctly, you shouldn’t have any error and you will be able to click on the “Next” button to start the process of creating your first Availability groupThumbs up.

12) In the summary page, verify that all configuration settings are ok and click “Finish”. Your first Availability group will be setup right away.

13) In the results page, verify that all tasks have been completed successfully.

Congrats! You have just created your first SQL Server 2012 AlwaysOn Availability group. Sharepoint 2013 or any other application that needs a database server, can use the Availability group listener’s name as the database connection string.

SQl2012_setup_16

You can clearly see that my Availability group is working and that I can manipulate it using SQL Management Studio. SPSQL01\SP2013 is the primary node of the SP2013 Availability group. SP2013_AG is Listener DNS name for my Sharepoint Availability group.

 

Closing thoughts

I have enjoyed writing the second part of the Sharepoint 2013 HA series. Tomorrow I will finish the series, by sharing my knowledge on how to complete a Microsoft Sharepoint 2013 Setup that will run on a Microsoft SQL 2012 Server AlwaysOn Availability group. After all, your first AlwaysOn Availability group is up and running Open-mouthed smile

SHAREPOINT_AG-STATUS

I want to wish my readers/followers/fellow Sharepoint Administrators a Merry Christmas, filled with joy and happiness.

 

Reading material

I want to share the original blogpost that helped me in the quest to setup my first AlwaysOn Availability group.

http://blogs.technet.com/b/canitpro/archive/2013/08/20/step-by-step-creating-a-sql-server-2012-alwayson-availability-group.aspx

Posted: Monday, December 23, 2013 9:05 AM by sergio

Comments

Anonymous comments are disabled