{"id":14511,"date":"2015-12-15T09:30:00","date_gmt":"2015-12-15T17:30:00","guid":{"rendered":"https:\/\/blogs.technet.microsoft.com\/dataplatforminsider\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/"},"modified":"2024-01-22T22:52:27","modified_gmt":"2024-01-23T06:52:27","slug":"enhanced-always-on-availability-groups-in-sql-server-2016","status":"publish","type":"post","link":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/","title":{"rendered":"Enhanced Always On Availability Groups in SQL Server 2016"},"content":{"rendered":"<h1>Always On Availability Groups<\/h1>\n<p>Always On Availability Groups are a fundamental component of the availability story for SQL Server, and provide a robust disaster recovery solution as well. Availability Groups were first introduced in SQL Server 2012, replacing the prior Database Mirroring technologies. They enable a DBA to configure two SQL instances to host replicas of a set of databases, which can be kept exactly in sync, giving zero data loss guarantees, or near exactly in sync (async replication, which is optimal for geographically remote replicas). This technology has become the standard which the majority of critical production SQL Server instances leverage.<\/p>\n<h1>Enhancements in SQL Server 2016 Availability Groups<\/h1>\n<p>SQL Server 2016 is making some significant improvements to the Always On Availability Groups set of features. There are a number of features, such as:<\/p>\n<ul>\n<li>Round-robin load balancing in readable secondaries<\/li>\n<li>Increased number of auto-failover targets<\/li>\n<li>Enhanced log replication throughput and redo speed<\/li>\n<li>Support for group-managed service accounts<\/li>\n<li>Support for Distributed Transactions (DTC)<\/li>\n<li>Basic HA in Standard edition<\/li>\n<li>Direct seeding of new database replicas<\/li>\n<\/ul>\n<p>These each deserve their own blog post, and I hope to get to them all. However, there is one feature area that I\u2019d like to focus on today because it opens up some interesting scenarios, and has been requested for a very long time.<\/p>\n<h1>Domain Independent Availability Groups<\/h1>\n<p>When Always On Availability Groups was introduced in SQL Server 2012, it represented a substantial advancement in the HA story over the previous technology, Database Mirroring (DBM). By adopting certain layers of Windows Server Failover Cluster (WSFC) functionality to use as infrastructure, the new solution is able to be much more performant, and to scale much better than the original DBM solution. Where DBM was limited to only two replicas, the Principal and the Mirror, Availability Groups could initially support five replicas (up to eight as of SQL Server 2014). Perhaps more significantly, where DBM established a relationship between one database and a copy of that database, Availability Groups, as the name implies, establishes a relationship between a set or group of databases, and replicas of that group of databases on one or more replicas. This means that for applications which access more than one database such as a SharePoint farm, we can now have all of the databases in the group move as a unit. We no longer need to worry about implementing complex scripting solutions to cause multiple databases to move as a unit.<\/p>\n<p>One of the additional restrictions that came with Availability Groups was the restriction that all nodes in the Availability Group must reside in the same Active Directory Domain.<\/p>\n<p>While this works well for a majority of our customers, there are some deployment patterns which cannot be met with current Always On Availability Groups\/Windows Server Failover Cluster solutions:<\/p>\n<ul>\n<li>Some corporate environments have multiple domains that cannot be merged, but would benefit from spanning an Availability Group across them. These multiple domains may or may not have trust relationships between them, but still there is a need to have servers hosting DR replicas.<\/li>\n<li>Some customers or specific installations are not in the context of Active Directory domains at all.<\/li>\n<\/ul>\n<h1>SQL Server and Windows Server Collaboration<\/h1>\n<p>In order to relieve this situation, SQL Server had two options: We could (once again) re-implement the functionality that we are currently getting from WSFC, or we could collaborate with the Windows Server Failover Cluster team to eliminate the single-domain restriction. The two teams met and worked for over a year to understand what the technical restrictions were that led to this limitation, and to envision what a solution that did not rely on AD for authentication and security would look like, and how it could be made usable.<\/p>\n<p>The result is that with the release of Windows Server 2016, Windows Server Failover Clusters will no longer require that all nodes in a cluster reside in the same domain. In fact, they will no longer require the nodes to live in any domain at all. You can now form a WSFC cluster from machines which are in workgroups. Because of this change, SQL Server 2016 is now able to deploy Always On Availability Groups in environments with:<\/p>\n<ul>\n<li>All nodes in a single domain<\/li>\n<li>Nodes in multiple domains with full trust<\/li>\n<li>Nodes in multiple domains with no trust<\/li>\n<li>Nodes in no domain at all<\/li>\n<\/ul>\n<p>This opens up a great number of new scenarios to customers, and removes previous blocks preventing migration from the deprecated Database Mirroring technology to AlwaysOn Availability Groups.<\/p>\n<h1>Installing and Configuring an Always On Availability Group without Domains<\/h1>\n<p>Although many customers will see this change as a great step forward in openness and flexibility, the AD infrastructure does make many operations simpler, so in order to operate without it we must compensate for these changes.<\/p>\n<h1>Setting up Windows Server Failover Clustering<\/h1>\n<p>In order to set up Windows Server Failover Clustering in an environment without AD security, we must provide a means to securely configure the cluster and provide for secure communications within the cluster. WSFC as of Windows Server 2016, creates self-signed certificates and uses these to secure intra-cluster authentication. In environments with AD security, we leverage that security infrastructure in order to establish the secure communication links. Without AD, we must take an extra step. In order to establish the cluster in environments without AD, WSFC requires you to set up synchronized admin accounts on all proposed cluster nodes. That means that there must be an account with the same name and the same password, that is in the Administrators group, on each node in the cluster. You must also be able to resolve the hostnames of all nodes in the cluster so that they can find each other.<\/p>\n<p>As of now, WSFC cannot be managed using the UI in environments without AD security, so you will need to form and manipulate the cluster using PowerShell cmdlets. Fortunately, the minimum of commands for our purposes is very simple.<\/p>\n<p><span style=\"color:#808080;font-family:courier new,courier\">PS C:\\&gt; New-Cluster -Name \u201cMyCluster\u201d -Nodes Node1,Node2,Node3,Node4 -AdministrativeAccessPoint DNS<\/span><\/p>\n<p>That\u2019s it! It really is that simple once the basics are set up.<\/p>\n<p>You can find more information on Domainless clusters from the Windows Cluster team on the <a href=\"http:\/\/blogs.msdn.com\/b\/clustering\/archive\/2015\/08\/17\/10635825.aspx?wt.mc_id=WW_CE_DM_OO_BLOG_NONE\">Failover Clustering and Network Load Balancing team blog<\/a>.<\/p>\n<h1>Configuring an Always On Availability Group<\/h1>\n<p>In environments without AD security, we must secure the \u201cMirroring Endpoints\u201d in the same way they were when used in Database Mirroring without domains. This involves a number of steps, and can be cumbersome, especially when there are a number of nodes in the AG. In order to facilitate this, I\u2019ve created a pair of scripts to help out. The first one, CreateEndpointCert, creates a certificate based on a password, and backs it up to a network share that all machines in the AG will have access to. In order to facilitate this, I recommend that you configure the SQL Server service to run as a user account which is synchronized in the same way that the Admin account used to set up the cluster was. This account need not be a box administrator, but this will enable a network share to be set up with write access to this account. The script then sets up the Mirroring Endpoint to be authenticated using this certificate. This means that when a connection attempt is made via the endpoint to another machine, that machine will be presented with the certificate as credentials for the login attempt.<\/p>\n<p>The second script, InstallEndpointCert, takes as parameters the remote computer whose certificate is to be installed on this instance, the share on which the certificates were backed up, and a strong password to be used for a local login.<\/p>\n<p>The script will restore the remote certificate, and create a login based on that certificate. It will then grant that user and login access to the instance. Now, when the endpoint from the other system attempts to connect, and presents the certificate, the local node will recognize that certificate as being linked to the local user, and grant the connection based upon that.<\/p>\n<p>So, the total sequence looks like:<\/p>\n<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n<tbody>\n<tr>\n<td width=\"484\" valign=\"top\">\n<span style=\"font-family:Times New Roman;font-size:medium\"> <\/span><\/p>\n<p><b><span style=\"font-family:Calibri;font-size:medium\">Node A<\/span><\/b><\/p>\n<p><span style=\"font-family:Times New Roman;font-size:medium\"> <\/span>\n<\/td>\n<td width=\"485\" valign=\"top\">\n<span style=\"font-family:Times New Roman;font-size:medium\"> <\/span><\/p>\n<p><b><span style=\"font-family:Calibri;font-size:medium\">Node B<\/span><\/b><\/p>\n<p><span style=\"font-family:Times New Roman;font-size:medium\"> <\/span>\n<\/td>\n<td width=\"485\" valign=\"top\">\n<span style=\"font-family:Times New Roman;font-size:medium\"> <\/span><\/p>\n<p><b><span style=\"font-family:Calibri;font-size:medium\">Node C<\/span><\/b><\/p>\n<p><span style=\"font-family:Times New Roman;font-size:medium\"> <\/span>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"484\" valign=\"top\">\n<span style=\"font-family:Times New Roman;font-size:medium\"> <\/span><\/p>\n<p><span style=\"font-family:Calibri;font-size:medium\">EXEC CreateEndpointCert \u2018\\\\NodeB\\MyShare\u2019 &#8216;1R3@llyStr0ngP@ssw0rd!&#8217;<\/span><\/p>\n<p><span style=\"font-family:Times New Roman;font-size:medium\"> <\/span>\n<\/td>\n<td width=\"485\" valign=\"top\">\n<span style=\"font-family:Times New Roman;font-size:medium\"> <\/span><\/p>\n<p><span style=\"font-family:Calibri;font-size:medium\">EXEC CreateEndpointCert \u2018\\\\NodeB\\MyShare\u2019 &#8216;1R3@llyStr0ngP@ssw0rd!&#8217;<\/span><\/p>\n<p><span style=\"font-family:Times New Roman;font-size:medium\"> <\/span>\n<\/td>\n<td width=\"485\" valign=\"top\">\n<span style=\"font-family:Times New Roman;font-size:medium\"> <\/span><\/p>\n<p><span style=\"font-family:Calibri;font-size:medium\">EXEC CreateEndpointCert \u2018\\\\NodeB\\MyShare\u2019 &#8216;1R3@llyStr0ngP@ssw0rd!&#8217;<\/span><\/p>\n<p><span style=\"font-family:Times New Roman;font-size:medium\"> <\/span>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"484\" valign=\"top\">\n<span style=\"font-family:Times New Roman;font-size:medium\"> <\/span><\/p>\n<p><span style=\"font-family:Calibri;font-size:medium\">EXEC InstallEndpointCert \u2018NodeB\u2019 &#8216;D1ff3rentStr0ngP@ssw0rd!&#8217;<\/span><\/p>\n<p><span style=\"font-family:Times New Roman;font-size:medium\"> <\/span>\n<\/td>\n<td width=\"485\" valign=\"top\">\n<span style=\"font-family:Times New Roman;font-size:medium\"> <\/span><\/p>\n<p><span style=\"font-family:Calibri;font-size:medium\">EXEC InstallEndpointCert \u2018NodeA\u2019 &#8216;D1ff3rentStr0ngP@ssw0rd!&#8217;<\/span><\/p>\n<p><span style=\"font-family:Times New Roman;font-size:medium\"> <\/span>\n<\/td>\n<td width=\"485\" valign=\"top\">\n<span style=\"font-family:Times New Roman;font-size:medium\"> <\/span><\/p>\n<p><span style=\"font-family:Calibri;font-size:medium\">EXEC InstallEndpointCert \u2018NodeA\u2019 &#8216;D1ff3rentStr0ngP@ssw0rd!&#8217;<\/span><\/p>\n<p><span style=\"font-family:Times New Roman;font-size:medium\"> <\/span>\n<\/td>\n<\/tr>\n<tr>\n<td width=\"484\" valign=\"top\">\n<span style=\"font-family:Times New Roman;font-size:medium\"> <\/span><\/p>\n<p><span style=\"font-family:Calibri;font-size:medium\">EXEC InstallEndpointCert \u2018NodeC\u2019 &#8216;D1ff3rentStr0ngP@ssw0rd!&#8217;<\/span><\/p>\n<p><span style=\"font-family:Times New Roman;font-size:medium\"> <\/span>\n<\/td>\n<td width=\"485\" valign=\"top\">\n<span style=\"font-family:Times New Roman;font-size:medium\"> <\/span><\/p>\n<p><span style=\"font-family:Calibri;font-size:medium\">EXEC InstallEndpointCert \u2018NodeC\u2019 &#8216;D1ff3rentStr0ngP@ssw0rd!&#8217;<\/span><\/p>\n<p><span style=\"font-family:Times New Roman;font-size:medium\"> <\/span>\n<\/td>\n<td width=\"485\" valign=\"top\">\n<span style=\"font-family:Times New Roman;font-size:medium\"> <\/span><\/p>\n<p><span style=\"font-family:Calibri;font-size:medium\">EXEC InstallEndpointCert \u2018NodeB\u2019 &#8216;D1ff3rentStr0ngP@ssw0rd!&#8217;<\/span><\/p>\n<p><span style=\"font-family:Times New Roman;font-size:medium\"> <\/span>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h1>Finishing the Setup<\/h1>\n<p>If you have set up the instances with synchronized service accounts, from this point on, you can create and manipulate the Availability Group much like any other. You can script the creation, or use the New AG wizard to create the AG. You manipulate it like any other, and monitor it using the Dashboard, DMVs or other SQL tools.<\/p>\n<h1><em>Scripts<\/em><\/h1>\n<p><strong>CreateEndpointCert<\/strong><\/p>\n<p><span style=\"color:#008000;font-family:courier new,courier\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212; This procedure automates the creation of a local certificate and the endpoints required for a domainless AG.<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212; Parameters are the strong password for the cert, and the location of a share which receives the backup of the cert.<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212; The share should be accessible to all nodes in the AG, as they will need to read the certs for each other.<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212; The procedure also creates the endpoint based upon the newly created cert.<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212;<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212; EXEC CreateEndpointCert &#8216;\\\\Myserver\\Myshare&#8217; &#8216;1R3@llyStr0ngP@ssw0rd!&#8217;<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/span><\/p>\n<p><span style=\"font-family:courier new,courier\"><span style=\"color:#0000ff\">CREA<\/span><span style=\"color:#0000ff\">TE PROCEDURE<\/span> CreateEndpointCert<\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0@ShareName <span style=\"color:#0000ff\">SYSNAME<\/span> <span style=\"color:#808080\">,<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0@StrongPassword <span style=\"color:#0000ff\">SYSNAME <\/span><\/span><br \/><span style=\"color:#0000ff;font-family:courier new,courier\">AS BEGIN<\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0<\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0<span style=\"color:#008000\">&#8211;This must be executed in the context of Master<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0<span style=\"color:#0000ff\">IF<\/span> <span style=\"color:#808080\">(<\/span><span style=\"color:#ff00ff\">DB_NAME<\/span><span style=\"color:#808080\">() &lt;&gt;<\/span> <span style=\"color:#ff0000\">&#8216;master&#8217;<\/span><span style=\"color:#808080\">)<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0<span style=\"color:#0000ff\">BEGIN<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0<span style=\"color:#0000ff\">PRINT<\/span> <span style=\"color:#ff0000\">N&#8217;This SP must be executed in master.\u00a0 USE master and then retry.&#8217;<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0<span style=\"color:#0000ff\">RETURN<\/span> <span style=\"color:#808080\">(<\/span>-1<span style=\"color:#808080\">)<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0<span style=\"color:#0000ff\">END<\/span><\/span><\/p>\n<p><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">DECLARE<\/span> @DynamicSQL <span style=\"color:#0000ff\">varchar<\/span><span style=\"color:#808080\">(<\/span>1000<span style=\"color:#808080\">);<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">DECLARE<\/span> @CompName <span style=\"color:#0000ff\">varchar<\/span><span style=\"color:#808080\">(<\/span>250<span style=\"color:#808080\">);<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0<span style=\"color:#0000ff\">DECLARE<\/span> @HasMasterKey <span style=\"color:#0000ff\">INT<\/span><span style=\"color:#808080\">;<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">SELECT<\/span> @CompName = CONVERT<span style=\"color:#808080\">(<\/span><span style=\"color:#0000ff\">SysName<\/span><span style=\"color:#808080\">,<\/span> SERVERPROPERTY<span style=\"color:#808080\">(<\/span><span style=\"color:#ff0000\">&#8216;MachineName&#8217;<\/span><span style=\"color:#808080\">));<\/span><\/span><\/p>\n<p><span style=\"color:#008000;font-family:courier new,courier\">\u00a0&#8212; Only create a master key if it doesn&#8217;t already exist<\/span><\/p>\n<p><span style=\"font-family:courier new,courier\">\u00a0<span style=\"color:#0000ff\">SELECT<\/span> @HasMasterKey <span style=\"color:#808080\">=<\/span> is_master_key_encrypted_by_server <span style=\"color:#0000ff\">from<\/span> <span style=\"color:#008000\">sys.databases<\/span> <span style=\"color:#0000ff\">where<\/span> name <span style=\"color:#808080\">=<\/span> <span style=\"color:#ff0000\">&#8216;master&#8217;<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0<span style=\"color:#0000ff\">IF<\/span> <span style=\"color:#808080\">(<\/span>@HasMasterKey = 0<span style=\"color:#808080\">)<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0<span style=\"color:#0000ff\">BEGIN<\/span><\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">\u00a0&#8211;Create a MASTER KEY to encrypt the certificate.<\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0<span style=\"color:#0000ff\">SET<\/span> @DynamicSQL <span style=\"color:#808080\">=<\/span> <span style=\"color:#ff00ff\">CONCAT<\/span><span style=\"color:#808080\">(<\/span><span style=\"color:#ff0000\">&#8216;CREATE MASTER KEY ENCRYPTION BY PASSWORD = &#8216;<\/span> <span style=\"color:#808080\">,<\/span>\u00a0 <span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span>@StrongPassword<span style=\"color:#808080\">,<\/span> <span style=\"color:#ff0000\">&#8221;&#8221;<\/span><span style=\"color:#808080\">));<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0<span style=\"color:#0000ff\">EXEC<\/span> <span style=\"color:#808080\">(<\/span>@DynamicSQL<span style=\"color:#808080\">)<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0<span style=\"color:#0000ff\">END<\/span><\/span><\/p>\n<p><span style=\"font-family:courier new,courier\">\u00a0<span style=\"color:#008000\">&#8211;Create the certificate to authenticate the endpoint<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">SET<\/span> @DynamicSQL <span style=\"color:#808080\">=<\/span> <span style=\"color:#ff00ff\">CONCAT<\/span><span style=\"color:#808080\">(<\/span><span style=\"color:#ff0000\">&#8216;CREATE CERTIFICATE &#8216;<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span>@CompName <span style=\"color:#808080\">+<\/span> <span style=\"color:#ff0000\">&#8216;-Cert&#8217;<\/span><span style=\"color:#808080\">),<\/span> <span style=\"color:#ff0000\">&#8216; WITH SUBJECT = &#8216;<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span>@CompName<span style=\"color:#808080\">,<\/span> <span style=\"color:#ff0000\">&#8221;&#8221;<\/span><span style=\"color:#808080\">)) ;<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">EXEC<\/span> <span style=\"color:#808080\">(<\/span>@DynamicSQL<span style=\"color:#808080\">);<\/span><\/span><\/p>\n<p><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#008000\">&#8211;Create the database mirroring endpoint authenticated by the certificate.<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">SET<\/span> @DynamicSQL <span style=\"color:#808080\">=<\/span> <\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color:#ff00ff\">CONCAT<\/span><span style=\"color:#808080\">(<\/span><span style=\"color:#ff0000\">&#8216;CREATE ENDPOINT Endpoint_Mirroring<\/span><\/span><br \/><span style=\"color:#ff0000;font-family:courier new,courier\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 STATE = STARTED<\/span><br \/><span style=\"color:#ff0000;font-family:courier new,courier\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 AS TCP (LISTENER_PORT = 5022, LISTENER_IP = ALL) <\/span><br \/><span style=\"font-family:courier new,courier\"><span style=\"color:#ff0000\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 FOR DATABASE_MIRRORING (AUTHENTICATION = CERTIFICATE &#8216;<\/span><span style=\"color:#808080\">,<\/span><span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span>@CompName <span style=\"color:#808080\">+<\/span> <span style=\"color:#ff0000\">&#8216;-Cert&#8217;<\/span><span style=\"color:#808080\">),<\/span> <span style=\"color:#ff0000\">&#8216; , ENCRYPTION = REQUIRED ALGORITHM AES, ROLE = ALL)&#8217;<\/span><span style=\"color:#808080\">);<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">EXEC<\/span> <span style=\"color:#808080\">(<\/span><\/span><span style=\"font-family:courier new,courier\">@DynamicSQL<span style=\"color:#808080\">);<\/span><\/span><\/p>\n<p><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#008000\">&#8211;Back up the certificate to a common network share for import into other nodes in the cluster<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">SET<\/span> @DynamicSQL <span style=\"color:#808080\">=<\/span> <span style=\"color:#ff00ff\">CONCAT<\/span><span style=\"color:#808080\">(<\/span><span style=\"color:#ff0000\">&#8216;BACKUP CERTIFICATE &#8216;<\/span><span style=\"color:#808080\">,<\/span><span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span>@CompName <span style=\"color:#808080\">+<\/span> <span style=\"color:#ff0000\">&#8216;-Cert&#8217;<\/span><span style=\"color:#808080\">),<\/span><span style=\"color:#ff0000\">&#8216; To FILE = &#8216;<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span> @ShareName <span style=\"color:#808080\">+<\/span> <span style=\"color:#ff0000\">&#8216;\\SQL-&#8216;<\/span> <span style=\"color:#808080\">+<\/span> @CompName <span style=\"color:#808080\">+<\/span> <span style=\"color:#ff0000\">&#8216;.cer&#8217;<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff0000\">&#8221;&#8221;<\/span><span style=\"color:#808080\">));<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">EXEC <\/span><span style=\"color:#808080\">(<\/span>@DynamicSQL<span style=\"color:#808080\">);<\/span><\/span><br \/><span style=\"color:#0000ff;font-family:courier new,courier\">END<\/span><br \/><span style=\"color:#0000ff;font-family:courier new,courier\">GO<\/span><\/p>\n<p><strong>InstallEndpointCert<\/strong><\/p>\n<p><span style=\"color:#008000;font-family:courier new,courier\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212;\u00a0 This procedure assumes that a certificate has been created on another node in the AG, and backed up to a common network share.<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212;\u00a0 Parameters:<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212;\u00a0\u00a0\u00a0 @CompName &#8211; The name of the computer whose certificate needs to be installed here.\u00a0 i.e. the other replica that this node needs to communicate with.<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212;\u00a0\u00a0\u00a0 @ShareName &#8211; A common network share to which certificates were backed up from each machine in the cluster\/AG.<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212;\u00a0\u00a0\u00a0 @StrongPassword &#8211; A strong password to be used for the login created to log in on behalf of the endpoint on the other node.<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212;<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212;\u00a0 This procedure assumes that each node has run CreateEndpointCert and that all cert backup files reside on the share pointed to by the second parameter.<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212;\u00a0 The procedure creates a login and a user for the remote machine, and then created a certificate to authorize the user when the certificate is used as authentication from the remote endpoint.<\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/span><\/p>\n<p><span style=\"font-family:courier new,courier\"><span style=\"color:#0000ff\">CREATE PROCEDURE<\/span> InstallEndpointCert<\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 @CompName <span style=\"color:#0000ff\">SYSNAME<\/span><span style=\"color:#808080\">,<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0@ShareName <span style=\"color:#0000ff\">SYSNAME<\/span><span style=\"color:#808080\">,<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0@StrongPassword <span style=\"color:#0000ff\">SYSNAME<\/span><\/span><br \/><span style=\"color:#0000ff;font-family:courier new,courier\">AS BEGIN<\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">DECLARE<\/span> @DynamicSQL <span style=\"color:#0000ff\">varchar<\/span><span style=\"color:#808080\">(<\/span>1000<span style=\"color:#808080\">);<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">DECLARE<\/span> @MyCompName <span style=\"color:#0000ff\">varchar<\/span><span style=\"color:#808080\">(<\/span>250<span style=\"color:#808080\">);<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">SELECT<\/span> @MyCompName <span style=\"color:#808080\">=<\/span> <span style=\"color:#ff00ff\">CONVERT<\/span><span style=\"color:#808080\">(<\/span><span style=\"color:#0000ff\">SysName<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff00ff\">SERVERPROPERTY<\/span><span style=\"color:#808080\">(<\/span><span style=\"color:#ff0000\">&#8216;MachineName&#8217;<\/span><span style=\"color:#808080\">));<\/span><\/span><br \/><span style=\"color:#008000;font-family:courier new,courier\">\u00a0 &#8211;Don&#8217;t need to create LOGINs for the local system<\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">IF<\/span> <span style=\"color:#808080\">(<\/span>@MyCompName <span style=\"color:#808080\">&lt;&gt;<\/span> @CompName<span style=\"color:#808080\">)<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">BEGIN<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">SET<\/span> @DynamicSQL = <span style=\"color:#ff00ff\">CONCAT<\/span><span style=\"color:#808080\">(<\/span><span style=\"color:#ff0000\">&#8216;CREATE LOGIN &#8216;<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff00ff\">QUOTENAME<\/span> <span style=\"color:#808080\">(<\/span>@CompName <span style=\"color:#808080\">+<\/span> <span style=\"color:#ff0000\">&#8216;-Login&#8217;<\/span><span style=\"color:#808080\">),<\/span> <span style=\"color:#ff0000\">&#8216; WITH PASSWORD= &#8216;<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span> @StrongPassword, <span style=\"color:#ff0000\">&#8221;&#8221;<\/span><span style=\"color:#808080\">));<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">EXEC<\/span> <span style=\"color:#808080\">(<\/span>@DynamicSQL<span style=\"color:#808080\">);<\/span><\/span><\/p>\n<p><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">SET<\/span> @DynamicSQL = <span style=\"color:#ff00ff\">CONCAT<\/span><span style=\"color:#808080\">(<\/span><span style=\"color:#ff0000\">&#8216;CREATE USER &#8216;<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span> @CompName <span style=\"color:#808080\">+<\/span> <span style=\"color:#ff0000\">&#8216;-User&#8217;<\/span><span style=\"color:#808080\">),<\/span> <span style=\"color:#ff0000\">&#8216; FOR LOGIN &#8216;<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span>@CompName <span style=\"color:#808080\">+<\/span> <span style=\"color:#ff0000\">&#8216;-Login&#8217;<\/span><span style=\"color:#808080\">));<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">EXEC<\/span> <span style=\"color:#808080\">(<\/span>@DynamicSQL<span style=\"color:#808080\">);<\/span><\/span><\/p>\n<p><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">SET<\/span> @DynamicSQL = <span style=\"color:#ff00ff\">CONCAT<\/span><span style=\"color:#808080\">(<\/span><span style=\"color:#ff0000\">&#8216;CREATE CERTIFICATE &#8216;<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span>@CompName <span style=\"color:#808080\">+<\/span><span style=\"color:#ff0000\">&#8216;-Cert&#8217;<\/span><span style=\"color:#808080\">),<\/span> <span style=\"color:#ff0000\">&#8216; AUTHORIZATION &#8216;<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span>@CompName <span style=\"color:#808080\">+<\/span><span style=\"color:#ff0000\">&#8216;-User&#8217;<\/span><span style=\"color:#808080\">),<\/span> <span style=\"color:#ff0000\">&#8216; FROM FILE = &#8216;<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span>@ShareName <span style=\"color:#808080\">+<\/span> <span style=\"color:#ff0000\">&#8216;\\SQL-&#8216;<\/span> <span style=\"color:#808080\">+<\/span> @CompName <span style=\"color:#808080\">+<\/span> <span style=\"color:#ff0000\">&#8216;.cer&#8217;<\/span> <span style=\"color:#808080\">,<\/span> <span style=\"color:#ff0000\">&#8221;&#8221;<\/span><span style=\"color:#808080\">));<\/span><\/span><br \/><span style=\"font-family:courier new,courier\"><span style=\"color:#0000ff\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 EXEC<\/span> <span style=\"color:#808080\">(<\/span>@DynamicSQL<span style=\"color:#808080\">);<\/span><\/span><\/p>\n<p><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">SET<\/span> @DynamicSQL = <span style=\"color:#ff00ff\">CONCAT<\/span><span style=\"color:#808080\">(<\/span><span style=\"color:#ff0000\">&#8216;GRANT CONNECT ON ENDPOINT::Endpoint_Mirroring TO &#8216;<\/span><span style=\"color:#808080\">,<\/span> <span style=\"color:#ff00ff\">QUOTENAME<\/span><span style=\"color:#808080\">(<\/span>@CompName +<span style=\"color:#ff0000\">&#8216;-Login&#8217;<\/span><span style=\"color:#808080\">));<\/span><\/span><br \/><span style=\"font-family:courier new,courier\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <span style=\"color:#0000ff\">EXEC<\/span> <span style=\"color:#808080\">(<\/span>@DynamicSQL<span style=\"color:#808080\">);<\/span><\/span><br \/><span style=\"color:#0000ff;font-family:courier new,courier\">\u00a0END<\/span><br \/><span style=\"color:#0000ff;font-family:courier new,courier\">END<\/span><br \/><span style=\"color:#0000ff;font-family:courier new,courier\">GO<\/span><\/p>\n<p><em><strong><a href=\"\/sqlserver\/2015\/12\/01\/get-the-most-out-of-sql-server-2016\/?wt.mc_id=WW_CE_DM_OO_BLOG_NONE\">See the other posts in the SQL Server 2016 blogging series.<\/a><\/strong><\/em><\/p>\n<p><a href=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2016\/03\/DPI-Blog_RC_Button1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-14851\" src=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2016\/03\/DPI-Blog_RC_Button1.png\" alt=\"Try SQL Server 2016 RC\" width=\"300\" height=\"57\" srcset=\"\"><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Always On Availability Groups Always On Availability Groups are a fundamental component of the availability story for SQL Server, and provide a robust disaster recovery solution as well. Availability Groups were first introduced in SQL Server 2012, replacing the prior Database Mirroring technologies.<\/p>\n","protected":false},"author":1457,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"ep_exclude_from_search":false,"_classifai_error":"","_classifai_text_to_speech_error":"","footnotes":""},"post_tag":[],"product":[5227,2403],"content-type":[2424,2448],"topic":[],"coauthors":[],"class_list":["post-14511","post","type-post","status-publish","format-standard","hentry","product-sql","product-sql-server-2016","content-type-best-practices","content-type-updates","review-flag-1593580427-503","review-flag-1593580419-556","review-flag-1-1593580431-15","review-flag-alway-1593580309-407","review-flag-lever-1593580264-545","review-flag-new-1593580247-437"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Enhanced Always On Availability Groups in SQL Server 2016 - Microsoft SQL Server Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Enhanced Always On Availability Groups in SQL Server 2016 - Microsoft SQL Server Blog\" \/>\n<meta property=\"og:description\" content=\"Always On Availability Groups Always On Availability Groups are a fundamental component of the availability story for SQL Server, and provide a robust disaster recovery solution as well. Availability Groups were first introduced in SQL Server 2012, replacing the prior Database Mirroring technologies.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/\" \/>\n<meta property=\"og:site_name\" content=\"Microsoft SQL Server Blog\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/sqlserver\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-15T17:30:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-23T06:52:27+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2016\/03\/DPI-Blog_RC_Button1.png\" \/>\n<meta name=\"author\" content=\"SQL Server Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@SQLServer\" \/>\n<meta name=\"twitter:site\" content=\"@SQLServer\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"SQL Server Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 min read\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/\"},\"author\":[{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/author\/sql-server-team\/\",\"@type\":\"Person\",\"@name\":\"SQL Server Team\"}],\"headline\":\"Enhanced Always On Availability Groups in SQL Server 2016\",\"datePublished\":\"2015-12-15T17:30:00+00:00\",\"dateModified\":\"2024-01-23T06:52:27+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/\"},\"wordCount\":2077,\"commentCount\":8,\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2016\/03\/DPI-Blog_RC_Button1.png\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/\",\"name\":\"Enhanced Always On Availability Groups in SQL Server 2016 - Microsoft SQL Server Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2016\/03\/DPI-Blog_RC_Button1.png\",\"datePublished\":\"2015-12-15T17:30:00+00:00\",\"dateModified\":\"2024-01-23T06:52:27+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#primaryimage\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2016\/03\/DPI-Blog_RC_Button1.png\",\"contentUrl\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2016\/03\/DPI-Blog_RC_Button1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Enhanced Always On Availability Groups in SQL Server 2016\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#website\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/\",\"name\":\"Microsoft SQL Server Blog\",\"description\":\"Official News from Microsoft\u2019s Information Platform\",\"publisher\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization\",\"name\":\"Microsoft SQL Server Blog\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png\",\"contentUrl\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png\",\"width\":259,\"height\":194,\"caption\":\"Microsoft SQL Server Blog\"},\"image\":{\"@id\":\"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"http:\/\/www.facebook.com\/sqlserver\",\"https:\/\/x.com\/SQLServer\",\"https:\/\/www.youtube.com\/user\/MSCloudOS\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Enhanced Always On Availability Groups in SQL Server 2016 - Microsoft SQL Server Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/","og_locale":"en_US","og_type":"article","og_title":"Enhanced Always On Availability Groups in SQL Server 2016 - Microsoft SQL Server Blog","og_description":"Always On Availability Groups Always On Availability Groups are a fundamental component of the availability story for SQL Server, and provide a robust disaster recovery solution as well. Availability Groups were first introduced in SQL Server 2012, replacing the prior Database Mirroring technologies.","og_url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/","og_site_name":"Microsoft SQL Server Blog","article_publisher":"http:\/\/www.facebook.com\/sqlserver","article_published_time":"2015-12-15T17:30:00+00:00","article_modified_time":"2024-01-23T06:52:27+00:00","og_image":[{"url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2016\/03\/DPI-Blog_RC_Button1.png","type":"","width":"","height":""}],"author":"SQL Server Team","twitter_card":"summary_large_image","twitter_creator":"@SQLServer","twitter_site":"@SQLServer","twitter_misc":{"Written by":"SQL Server Team","Est. reading time":"8 min read"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#article","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/"},"author":[{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/author\/sql-server-team\/","@type":"Person","@name":"SQL Server Team"}],"headline":"Enhanced Always On Availability Groups in SQL Server 2016","datePublished":"2015-12-15T17:30:00+00:00","dateModified":"2024-01-23T06:52:27+00:00","mainEntityOfPage":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/"},"wordCount":2077,"commentCount":8,"publisher":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#primaryimage"},"thumbnailUrl":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2016\/03\/DPI-Blog_RC_Button1.png","inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/","name":"Enhanced Always On Availability Groups in SQL Server 2016 - Microsoft SQL Server Blog","isPartOf":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#primaryimage"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#primaryimage"},"thumbnailUrl":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2016\/03\/DPI-Blog_RC_Button1.png","datePublished":"2015-12-15T17:30:00+00:00","dateModified":"2024-01-23T06:52:27+00:00","breadcrumb":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#primaryimage","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2016\/03\/DPI-Blog_RC_Button1.png","contentUrl":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2016\/03\/DPI-Blog_RC_Button1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/2015\/12\/15\/enhanced-always-on-availability-groups-in-sql-server-2016\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/"},{"@type":"ListItem","position":2,"name":"Enhanced Always On Availability Groups in SQL Server 2016"}]},{"@type":"WebSite","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#website","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/","name":"Microsoft SQL Server Blog","description":"Official News from Microsoft\u2019s Information Platform","publisher":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#organization","name":"Microsoft SQL Server Blog","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png","contentUrl":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-content\/uploads\/2019\/08\/Microsoft-Logo.png","width":259,"height":194,"caption":"Microsoft SQL Server Blog"},"image":{"@id":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/#\/schema\/logo\/image\/"},"sameAs":["http:\/\/www.facebook.com\/sqlserver","https:\/\/x.com\/SQLServer","https:\/\/www.youtube.com\/user\/MSCloudOS"]}]}},"msxcm_display_generated_audio":false,"msxcm_animated_featured_image":null,"_links":{"self":[{"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/posts\/14511","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/users\/1457"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/comments?post=14511"}],"version-history":[{"count":0,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/posts\/14511\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/media?parent=14511"}],"wp:term":[{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/post_tag?post=14511"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/product?post=14511"},{"taxonomy":"content-type","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/content-type?post=14511"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/topic?post=14511"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.microsoft.com\/en-us\/sql-server\/blog\/wp-json\/wp\/v2\/coauthors?post=14511"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}