Sitecore 8.2 – SQL Server Always On Availability Groups

Avatar de Vinicius

Couple months ago I wrote a post talking about the changes in Sitecore 8.2 from requirements perspective. At that time, I didn’t know about the support of SQL Server Always On Availability Groups!

Microsoft SQL Server Always On is only supported in Sitecore 8.2 and later

For many years High Availability and Disaster Recovery in SQL Server relied on Mirroring, Clustering, Log Shipping and couple others. Since SQL Server 2012 it is possible to enjoy all the benefits listed as follows:

Although it has been available since SQL Server 2012, Sitecore firs introduced Always On support on the initial release of its 8.2 version.

And how can I tell to my Sitecore to use my SQL Server Always On?

First of all, make sure you are running Sitecore 8.2 or later!

Second thing, you will need to change the way the ConnectionStrings.config connects to the SQL Server as you can see below:

[code language=”xml”]
<add name=”master” connectionString=”user id=sa;password=YourPasswordHere;Data Source=MySQL;Database=Sitecore_Master;ConnectRetryCount=10;ConnectRetryInterval=5″ />
[/code]

The new parameters ConnectRetryCount and ConnectRetryInterval are a reflection of the time it takes in seconds for a failover to complete.

BONUS!
In Sitecore.config there’s a parameter named Retryer which can be increased, and also used for debug purposes as you can see below:

[code language=”xml”]
<retryer disabled=”false” type=”Sitecore.Data.DataProviders.Retryer, Sitecore.Kernel”>
<param desc=”Number of tries”>30</param>
<param desc=”Interval between tries”>00:00:01.000</param>
<param desc=”Log each exception (should be used for debug only)”>false</param>
</retryer>
[/code]

BONUS! BONUS!

As soon as I finished this post, it came to my mind “How Sitecore controls the communication with SQL Server Always On?” and I thought “LET’S ASK”, then I went to http://sitecore.stackexchange.com/

And thanks to Richard Seal, now I know that the SqlConnection object handle that and it is part of .NET!

If you are more interested on my question and on the answer, check out here

I hope you liked, thanks for reading! I’ll see you on my next post!

Tagged in :

Avatar de Vinicius

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *