{"id":406,"date":"2020-10-25T15:28:42","date_gmt":"2020-10-25T15:28:42","guid":{"rendered":"https:\/\/kindsonthegenius.com\/mssql\/?p=406"},"modified":"2020-10-25T15:32:41","modified_gmt":"2020-10-25T15:32:41","slug":"how-to-configure-always-on-in-ms-sql-server-2019","status":"publish","type":"post","link":"https:\/\/www.kindsonthegenius.com\/mssql\/how-to-configure-always-on-in-ms-sql-server-2019\/","title":{"rendered":"How to Configure Always-On in MS SQL Server 2019"},"content":{"rendered":"<p>In this tutorial, we would go through the process of creating an Always-On Availability in SQL Server 2019.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Overview of AlwaysOn Availability<\/strong><\/p>\n<p>AlwaysOn is a High-Availability(HA) technique used as a disaster recovery(DR) system for a set of databases placed in a group called availability group. All the nodes participating in an AlwaysOn must be clustered in windows. That is they must be in the same windows failover cluster.<\/p>\n<p>Take note of the following terms, that you&#8217;ll encounter in setting up Always On<\/p>\n<ul>\n<li><strong>Availability Group<\/strong> &#8211; logical container that is hosting the AlwaysOn availability replicas and databases<\/li>\n<li><strong>Availability Replica<\/strong> &#8211; the instances that are hosting the databases<\/li>\n<li><strong>Availability Databases<\/strong> &#8211; these are the databases protected by the AlwaysOn availability<\/li>\n<li><strong>Availability Group Listener<\/strong> &#8211; this the way the users connect to the database. It is a network name and IP address<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h4><strong>Process of Configuring AlwaysOn Availability<\/strong><\/h4>\n<p>These are the general procedure for setting up Always On<\/p>\n<ul>\n<li>Create a Windows Failover Cluster<\/li>\n<li>Instal SQL Server on all the Nodes<\/li>\n<li>Enable AlwaysOn on All the Nodes<\/li>\n<li>Create Your Databases<\/li>\n<li>Configure AlwaysOn Availability Group<\/li>\n<li>Check the Availability Group Dashboard<\/li>\n<\/ul>\n<p>Let&#8217;s now follow the step by step procedure below<\/p>\n<p>I already created windows failover cluster (<a href=\"https:\/\/www.kindsonthegenius.com\/windows-server-2019-failover-cluster-installation-and-setup-step-by-step\/\" target=\"_blank\" rel=\"noopener noreferrer\">see how to set up windows Failover Cluster<\/a>). I&#8217;ve also installed SQL Server on the 2 nodes I want to use.<\/p>\n<p><strong>Step 1<\/strong>&#8211; Enable AlwaysOn Availability in all the nodes<\/p>\n<p>To do this, Open configuration manager and go to the properties of the database. Click on the AlwaysOn availability and enable it as shown below<\/p>\n<figure id=\"attachment_407\" aria-describedby=\"caption-attachment-407\" style=\"width: 253px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-24-at-22.51.38.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-407\" src=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-24-at-22.51.38.png?resize=253%2C300&#038;ssl=1\" alt=\"Enable AlwaysOn Availability from Configuration Manager\" width=\"253\" height=\"300\" srcset=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-24-at-22.51.38.png?resize=253%2C300&amp;ssl=1 253w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-24-at-22.51.38.png?w=421&amp;ssl=1 421w\" sizes=\"auto, (max-width: 253px) 100vw, 253px\" \/><\/a><figcaption id=\"caption-attachment-407\" class=\"wp-caption-text\">Enable AlwaysOn Availability from Configuration Manager<\/figcaption><\/figure>\n<p><strong>Step 2<\/strong> &#8211; Start the AlwaysOn High Availability Wizar<\/p>\n<p>To do this, open Managment Studio, expand Always On High Availability. Right Click Availability Group and choose New Availability Group Wizard.<\/p>\n<figure id=\"attachment_408\" aria-describedby=\"caption-attachment-408\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.08.21.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-408\" src=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.08.21.png?resize=300%2C277&#038;ssl=1\" alt=\"Start New Availability Group Wizard\" width=\"300\" height=\"277\" srcset=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.08.21.png?resize=300%2C277&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.08.21.png?w=601&amp;ssl=1 601w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-408\" class=\"wp-caption-text\">Start New Availability Group Wizard<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<figure id=\"attachment_409\" aria-describedby=\"caption-attachment-409\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.12.03.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-409\" src=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.12.03.png?resize=300%2C274&#038;ssl=1\" alt=\"Availability Group Wizard\" width=\"300\" height=\"274\" srcset=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.12.03.png?resize=300%2C274&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.12.03.png?resize=768%2C701&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.12.03.png?w=826&amp;ssl=1 826w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-409\" class=\"wp-caption-text\">Availability Group Wizard<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p><strong>Step 3<\/strong> &#8211; Click next on the wizard and provide and name for the Availability group.<\/p>\n<figure id=\"attachment_410\" aria-describedby=\"caption-attachment-410\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.15.51.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-410\" src=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.15.51.png?resize=300%2C274&#038;ssl=1\" alt=\"Name the Availability Group\" width=\"300\" height=\"274\" srcset=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.15.51.png?resize=300%2C274&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.15.51.png?resize=768%2C701&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.15.51.png?w=826&amp;ssl=1 826w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-410\" class=\"wp-caption-text\">Name the Availability Group<\/figcaption><\/figure>\n<p><strong>Step 4<\/strong> &#8211; Select the Databases you want to use for the Availability Group<\/p>\n<figure id=\"attachment_411\" aria-describedby=\"caption-attachment-411\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.19.49.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-411\" src=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.19.49.png?resize=300%2C274&#038;ssl=1\" alt=\"Select Databases that meets prerequisite\" width=\"300\" height=\"274\" srcset=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.19.49.png?resize=300%2C274&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.19.49.png?resize=768%2C701&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.19.49.png?w=826&amp;ssl=1 826w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-411\" class=\"wp-caption-text\">Select Databases that meets prerequisite<\/figcaption><\/figure>\n<p><strong>Step 5<\/strong> &#8211; In the next screen, add the secondary replication using the button Add Replication. For this demo, I added one more<\/p>\n<figure id=\"attachment_412\" aria-describedby=\"caption-attachment-412\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.34.32.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-412\" src=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.34.32.png?resize=300%2C230&#038;ssl=1\" alt=\"Add Replicas\" width=\"300\" height=\"230\" srcset=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.34.32.png?resize=300%2C230&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.34.32.png?resize=768%2C588&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.34.32.png?w=899&amp;ssl=1 899w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-412\" class=\"wp-caption-text\">Add Replicas<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p><strong>Step 6<\/strong> &#8211; Add a Listener<\/p>\n<p>Click on the Listener tab and add a new Listener. For this demo, I use the settings below<\/p>\n<figure id=\"attachment_413\" aria-describedby=\"caption-attachment-413\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.39.49.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-413\" src=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.39.49.png?resize=300%2C230&#038;ssl=1\" alt=\"Add availability group listener\" width=\"300\" height=\"230\" srcset=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.39.49.png?resize=300%2C230&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.39.49.png?resize=768%2C588&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.39.49.png?w=899&amp;ssl=1 899w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-413\" class=\"wp-caption-text\">Add availability group listener<\/figcaption><\/figure>\n<p><strong>Step 7<\/strong> &#8211; For the Initial Data Synchronisation, accept the default<\/p>\n<figure id=\"attachment_414\" aria-describedby=\"caption-attachment-414\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.49.32.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-414\" src=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.49.32.png?resize=300%2C230&#038;ssl=1\" alt=\"Initial Data Synchronization\" width=\"300\" height=\"230\" srcset=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.49.32.png?resize=300%2C230&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.49.32.png?resize=768%2C588&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.49.32.png?w=899&amp;ssl=1 899w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-414\" class=\"wp-caption-text\">Initial Data Synchronisation<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<p>Ensure that the validation succeeds as shown below. Then you can proceed to\u00a0 complete the installation.<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.56.51.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-415 aligncenter\" src=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.56.51.png?resize=300%2C230&#038;ssl=1\" alt=\"\" width=\"300\" height=\"230\" srcset=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.56.51.png?resize=300%2C230&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.56.51.png?resize=768%2C588&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-01.56.51.png?w=899&amp;ssl=1 899w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>At the end of all the steps, the final window would give a success message as shown below:<\/p>\n<figure id=\"attachment_417\" aria-describedby=\"caption-attachment-417\" style=\"width: 300px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-15.43.43.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-417\" src=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-15.43.43.png?resize=300%2C249&#038;ssl=1\" alt=\"Always On Availability Group Wizard Completed Successfully\" width=\"300\" height=\"249\" srcset=\"https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-15.43.43.png?resize=300%2C249&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-15.43.43.png?resize=768%2C638&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.kindsonthegenius.com\/mssql\/wp-content\/uploads\/sites\/11\/2020\/10\/Screenshot-2020-10-25-at-15.43.43.png?w=828&amp;ssl=1 828w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><figcaption id=\"caption-attachment-417\" class=\"wp-caption-text\">Always On Availability Group Wizard Completed Successfully<\/figcaption><\/figure>\n<p>&nbsp;<\/p>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>In this tutorial, we would go through the process of creating an Always-On Availability in SQL Server 2019. &nbsp; Overview of AlwaysOn Availability AlwaysOn is &hellip; <!-- AddThis Advanced Settings generic via filter on get_the_excerpt --><!-- AddThis Share Buttons generic via filter on get_the_excerpt --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[23],"tags":[],"class_list":["post-406","post","type-post","status-publish","format-standard","hentry","category-ms-sql-server"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.kindsonthegenius.com\/mssql\/wp-json\/wp\/v2\/posts\/406","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kindsonthegenius.com\/mssql\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.kindsonthegenius.com\/mssql\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/mssql\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/mssql\/wp-json\/wp\/v2\/comments?post=406"}],"version-history":[{"count":3,"href":"https:\/\/www.kindsonthegenius.com\/mssql\/wp-json\/wp\/v2\/posts\/406\/revisions"}],"predecessor-version":[{"id":419,"href":"https:\/\/www.kindsonthegenius.com\/mssql\/wp-json\/wp\/v2\/posts\/406\/revisions\/419"}],"wp:attachment":[{"href":"https:\/\/www.kindsonthegenius.com\/mssql\/wp-json\/wp\/v2\/media?parent=406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/mssql\/wp-json\/wp\/v2\/categories?post=406"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.kindsonthegenius.com\/mssql\/wp-json\/wp\/v2\/tags?post=406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}