{"id":15596,"date":"2020-06-09T19:45:26","date_gmt":"2020-06-09T19:45:26","guid":{"rendered":"https:\/\/dbtut.com\/?p=15596"},"modified":"2020-06-09T19:46:39","modified_gmt":"2020-06-09T19:46:39","slug":"sql-server-2019-alwayson-availability-group-on-docker-containers","status":"publish","type":"post","link":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/","title":{"rendered":"SQL Server 2019 AlwaysOn Availability Group on Docker Containers"},"content":{"rendered":"<h2>SQL Server 2019 AlwaysOn Availability Group on Docker Container Part 1<\/h2>\n<p>SQL Server started to support Linux with the 2016 version. Along with the 2017 and 2019 versions, it started to support HA\/DR, Kubernetes and Big Data Cluster solutions on Linux and Container platforms.<\/p>\n<p>In this article, we will install SQL Server 2019 on Docker Container on 3 nodes and create AlwaysOn Availability Group.<\/p>\n<p>Our goal is to make our environment ready quickly with a single configuration file. Thus, developer or test teams can quickly perform tests such as compatibility, connectivity, code functional.<\/p>\n<p>In this section, we will first prepare an image based on Ubuntu to be able to install Availability Group on the container. We will then perform the necessary installations.<\/p>\n<p>Important: It is not recommended to perform operations in a production environment. The installations were performed on Ubuntu 18.04.<\/p>\n<p>You can find detailed information about Docker installation <a href=\"https:\/\/docs.docker.com\/engine\/install\/ubuntu\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/p>\n<pre class=\"lang:default decode:true \">$ lsb_release -a\nNo LSB modules are available.\nDistributor ID: Ubuntu\nDescription:    Ubuntu 18.04.4 LTS\nRelease:        18.04\nCodename:       bionic<\/pre>\n<p>If there is a docker installation from the previous version, it is recommended to remove it.<\/p>\n<p>Next we need to install the packages required for docker installation:<\/p>\n<pre class=\"lang:default decode:true \">$ sudo apt-get remove docker docker-engine docker.io containerd runc\n$ sudo apt-get update\n$ sudo apt-get install \\\n    apt-transport-https \\\n    ca-certificates \\\n    curl \\\n    gnupg-agent \\\n    software-properties-common<\/pre>\n<p>We add Docker&#8217;s official GPG key:<\/p>\n<pre class=\"lang:default decode:true \">$ curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo apt-key add -<\/pre>\n<p>We add the Docker repos:<\/p>\n<pre class=\"lang:default decode:true \">$ sudo add-apt-repository \\\n   \"deb [arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu \\\n   $(lsb_release -cs) \\\n   stable\"<\/pre>\n<p>Let&#8217;s finally install the Docker engine in the installation step:<\/p>\n<pre class=\"lang:default decode:true \">$ sudo apt-get update\n$ sudo apt-get install docker-ce docker-ce-cli containerd.io<\/pre>\n<p>We run the following command to verify the Docker installation:<\/p>\n<pre class=\"lang:default decode:true \">$ sudo docker run hello-world<\/pre>\n<p>The output should be as follows. There is a warning that starts with \u201cUnable to\u2026\u201d. It is normal to see this warning because there is no image in the local and it pulls the image from the docker hub.<\/p>\n<pre class=\"lang:default decode:true \">Unable to find image 'hello-world:latest' locally\nlatest: Pulling from library\/hello-world\n0e03bdcc26d7: Pull complete\nDigest: sha256:6a65f928fb91fcfbc963f7aa6d57c8eeb426ad9a20c7ee045538ef34847f44f1\nStatus: Downloaded newer image for hello-world:latest\n\nHello from Docker!\nThis message shows that your installation appears to be working correctly.\n..\nTo try something more ambitious, you can run an Ubuntu container with:\n $ docker run -it ubuntu bash<\/pre>\n<p>In order not to write sudo every time, we switch with sudo su:<\/p>\n<pre class=\"lang:default decode:true \">$ sudo su<\/pre>\n<p>To prepare the Image, we pull the container images of Ubuntu and SQL Server 2019 from the docker hub:<\/p>\n<pre class=\"lang:default decode:true \">$ docker pull ubuntu:18.04\n18.04: Pulling from library\/ubuntu\n23884877105a: Pull complete\nbc38caa0f5b9: Pull complete\n2910811b6c42: Pull complete\n36505266dcc6: Pull complete\nDigest: sha256:3235326357dfb65f1781dbc4df3b834546d8bf914e82cce58e6e6b676e23ce8f\nStatus: Downloaded newer image for ubuntu:18.04\ndocker.io\/library\/ubuntu:18.04\n \n$ docker pull mcr.microsoft.com\/mssql\/server:2019-latest\n2019-latest: Pulling from mssql\/server\n5b7339215d1d: Pull complete\n14ca88e9f672: Pull complete\n..\n9a00f22bcd90: Pull complete\n1a5a58ce1097: Pull complete\nDigest: sha256:360f6e6da94fa0c5ec9cbe6e391f411b8d6e26826fe57a39a70a2e9f745afd82\nStatus: Downloaded newer image for mcr.microsoft.com\/mssql\/server:2019-latest\nmcr.microsoft.com\/mssql\/server:2019-latest\n<\/pre>\n<p>After the images are pulled, let&#8217;s list the images in our local:<\/p>\n<pre class=\"lang:default decode:true \">$ docker images\nREPOSITORY                       TAG                 IMAGE ID            CREATED             SIZE\nubuntu                           18.04               c3c304cb4f22        5 weeks ago         64.2MB\nmcr.microsoft.com\/mssql\/server   2019-latest         d60e9ac97708        2 months ago        1.5GB\nhello-world                      latest              bf756fb1ae65        5 months ago        13.3kB<\/pre>\n<p>To check, let&#8217;s create the SQL Server 2019 container and check the version information. To accept the user agreement and set the SA password, we set the environment variables and map the outer port to the container port.<\/p>\n<pre class=\"lang:default decode:true \">$ docker run -e \"ACCEPT_EULA=Y\" -e \"SA_PASSWORD=Str0ngPa$w0rd\" \\\n   -p 1501:1433 --name sqldemo \\\n   -d mcr.microsoft.com\/mssql\/server:2019-latest<\/pre>\n<p>We run the following code to see running containers:<\/p>\n<pre class=\"lang:default decode:true \">$ docker ps -a\nCONTAINER ID        IMAGE                                        COMMAND                  CREATED             STATUS              PORTS                    NAMES\n9c3eceb18f3f        mcr.microsoft.com\/mssql\/server:2019-latest   \"\/opt\/mssql\/bin\/perm\u2026\"   36 seconds ago      Up 34 seconds       0.0.0.0:1501-&gt;1433\/tcp   sqldemo\n<\/pre>\n<p>We only see the container we have created, if there are containers you have created for testing purposes, you can see different containers in the list.<\/p>\n<p>We run the following commands to switch to interactive mode and learn the SQL Server version (PRINT was used to get clean output in the terminal):<\/p>\n<pre class=\"lang:default decode:true \">$ docker exec -it sqldemo \"bash\"\nmssql@9c3eceb18f3f:\/$ \/opt\/mssql-tools\/bin\/sqlcmd -S localhost -U SA -Q\"PRINT @@VERSION\"\nPassword:\nMicrosoft SQL Server 2019 (RTM-CU4) (KB4548597) - 15.0.4033.1 (X64)\n        Mar 14 2020 16:10:35\n        Copyright (C) 2019 Microsoft Corporation\n        Developer Edition (64-bit) on Linux (Ubuntu 18.04.4 LTS) &lt;X64&gt;\nmssql@9c3eceb18f3f:\/$ exit<\/pre>\n<p>It seems that SQL Server 2019 Developer Edition RTM CU4 has been installed. In this section we can finally list the active containers and stop and remove the ones we do not currently need:<\/p>\n<pre class=\"lang:default decode:true \">$ docker ps -a\nCONTAINER ID        IMAGE                                        COMMAND                  CREATED             STATUS              PORTS                    NAMES\n9c3eceb18f3f        mcr.microsoft.com\/mssql\/server:2019-latest   \"\/opt\/mssql\/bin\/perm\u2026\"   6 minutes ago       Up 6 minutes        0.0.0.0:1501-&gt;1433\/tcp   sqldemo\n$ docker stop 9c3eceb18f3f\n9c3eceb18f3f\n$ docker rm 9c3eceb18f3f\n9c3eceb18f3f<\/pre>\n<p>Additional information: Instead of the entire container id, you can type the first 2 or 3 characters that make it unique.<\/p>\n<p>Example: You can write 9c instead of 9c3eceb18f3f if there is not any other container that starts with 9c.<\/p>\n<p>Again, if you want to list only container ids of active containers, you can use the following command:<\/p>\n<pre class=\"lang:default decode:true \">$ docker ps -aq<\/pre>\n<h2>SQL Server 2019 AlwaysOn Availability Group on Docker Container Part 2<\/h2>\n<p>We completed the docker installation in Part 1 and pulled the images to our local.<\/p>\n<p>In this part, we will prepare the Ubuntu 18.04 image we pulled from the docker hub for SQL Server 2019 HA and make it ready for installation. First, let&#8217;s create a new directory. We will store our configuration files in this directory.<\/p>\n<pre class=\"lang:default decode:true \">$ mkdir sql2019ha-demo\n$ cd sql2019ha-demo\n$ ls -l\ntotal 0<\/pre>\n<p>In order to build a new container image, we will create a file named dockerfile and add the necessary instructions. You can find detailed information about Dockerfile <a href=\"https:\/\/docs.docker.com\/engine\/reference\/builder\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/p>\n<pre class=\"lang:default decode:true \">$ touch dockerfile\n$ vi dockerfile<\/pre>\n<pre class=\"lang:default decode:true \">FROM ubuntu:18.04\n\nRUN apt-get update\n\nRUN apt install sudo wget curl gnupg gnupg1 gnupg2 -y\nRUN apt install software-properties-common systemd vim -y\nRUN wget -qO- https:\/\/packages.microsoft.com\/keys\/microsoft.asc | sudo apt-key add -\n\nRUN add-apt-repository \"$(wget -qO- https:\/\/packages.microsoft.com\/config\/ubuntu\/18.04\/mssql-server-2019.list)\"\nRUN apt-get update\nRUN apt-get install -y mssql-server\n\nRUN \/opt\/mssql\/bin\/mssql-conf set hadr.hadrenabled  1\nRUN \/opt\/mssql\/bin\/mssql-conf set sqlagent.enabled true\n\nEXPOSE 1433\n\nENTRYPOINT \/opt\/mssql\/bin\/sqlservr<\/pre>\n<p>Let me explain the keywords and their values, respectively.<\/p>\n<p>FROM: The image, that the image to be created will be based on.<\/p>\n<p>RUN: Command sets to be run during image preparation phase.<\/p>\n<p>EXPOSE: With this command, the port to access the container is determined. So the port that the container will listen to.<\/p>\n<p>ENTRYPOINT: To run commands, services etc. when the container is started.<\/p>\n<p>After our Dockerfile is prepared, we can now build our image and make it ready for use.<\/p>\n<pre class=\"lang:default decode:true \">$ docker build -t sqlag2019:ha .\nSending build context to Docker daemon   2.56kB\nStep 1\/12 : FROM ubuntu:18.04\n ---&gt; c3c304cb4f22\nStep 2\/12 : RUN apt-get update\n ---&gt; Running in 950e50f80f00\nGet:1 http:\/\/archive.ubuntu.com\/ubuntu bionic InRelease [242 kB]\nGet:2 http:\/\/security.ubuntu.com\/ubuntu bionic-security InRelease [88.7 kB]\nGet:3 http:\/\/security.ubuntu.com\/ubuntu bionic-security\/main amd64 Packages [932 kB]\nGet:4 http:\/\/archive.ubuntu.com\/ubuntu bionic-updates InRelease [88.7 kB]...\nStep 3\/12 : RUN apt install sudo wget curl gnupg gnupg1 gnupg2 -y\n ---&gt; Running in edc9d15b2383\n..\n..\nStep 8\/12 : RUN sudo apt-get install -y mssql-server\n ---&gt; Running in 43d82a503f8a\nReading package lists...\nBuilding dependency tree...\nReading state information...\nThe following additional packages will be installed:\nStep 9\/12 : RUN sudo \/opt\/mssql\/bin\/mssql-conf set hadr.hadrenabled  1\n ---&gt; Running in 166c6596d2dd\nSQL Server needs to be restarted in order to apply this setting. Please run\n'systemctl restart mssql-server.service'.\nRemoving intermediate container 166c6596d2dd\n ---&gt; bcdb057fed43\nStep 10\/12 : RUN sudo \/opt\/mssql\/bin\/mssql-conf set sqlagent.enabled true\n ---&gt; Running in 22dd6a93d1ef\nSQL Server needs to be restarted in order to apply this setting. Please run\n'systemctl restart mssql-server.service'.\nRemoving intermediate container 22dd6a93d1ef\n ---&gt; 6b90afbaf94e\nStep 11\/12 : EXPOSE 1433\n ---&gt; Running in bcc14f3b0bad\nRemoving intermediate container bcc14f3b0bad\n ---&gt; 4aae1563aa74\nStep 12\/12 : ENTRYPOINT \/opt\/mssql\/bin\/sqlservr\n ---&gt; Running in 68b6ed45ff6a\nRemoving intermediate container 68b6ed45ff6a\n ---&gt; b7467618c371\nSuccessfully built b7467618c371\nSuccessfully tagged sqlag2019:ha<\/pre>\n<p>In the last two lines, we see that the build process was successful and that the image was successfully created in our local. Let&#8217;s see the image we prepared by running the following command:<\/p>\n<pre class=\"lang:default decode:true \">$ docker images\nREPOSITORY                       TAG                 IMAGE ID            CREATED              SIZE\nsqlag2019                        ha                  b7467618c371        About a minute ago   1.4GB\nubuntu                           18.04               c3c304cb4f22        5 weeks ago          64.2MB\nmcr.microsoft.com\/mssql\/server   2019-latest         d60e9ac97708        2 months ago         1.5GB\nhello-world                      latest              bf756fb1ae65        5 months ago         13.3kB<\/pre>\n<p>Now that the image is ready, we can create the configuration file with docker-compose to get 3 SQL nodes up at once. You can find detailed information about Docker Compose <a href=\"https:\/\/docs.docker.com\/compose\/\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>. Make sure that the Docker Compose configuration file is in the directory you are working in.<\/p>\n<pre class=\"lang:default decode:true \">$ touch docker-compose.yml\n$ vi docker-compose.yml<\/pre>\n<pre class=\"lang:default decode:true \">version: '3'\n\nservices:\n  db1:\n    container_name: sqlNode1\n    image: sqlag2019:ha\n    hostname: sqlNode1\n    domainname: lab.local\n    environment:\n      SA_PASSWORD: \"Str0ngPa$w0rd\"\n      ACCEPT_EULA: \"Y\"\n    ports:\n    - \"1501:1433\"\n    extra_hosts:\n      sqlNode2.labl.local: \"172.16.238.22\"\n      sqlNode3.labl.local: \"172.16.238.23\"\n    networks:\n        internal:\n                ipv4_address: 172.16.238.21\n\n  db2:\n    container_name: sqlNode2\n    image: sqlag2019:ha\n    hostname: sqlNode2\n    domainname: lab.local\n    environment:\n      SA_PASSWORD: \"Str0ngPa$w0rd\"\n      ACCEPT_EULA: \"Y\"\n    ports:\n    - \"1502:1433\"\n    extra_hosts:\n      sqlNode1.lab.local: \"172.16.238.21\"\n      sqlNode3.lab.local: \"172.16.238.23\"\n    networks:\n        internal:\n                ipv4_address: 172.16.238.22\n\n  db3:\n    container_name: sqlNode3\n    image: sqlag2019:ha\n    hostname: sqlNode3\n    domainname: lab.local\n    environment:\n      SA_PASSWORD: \"Str0ngPa$w0rd\"\n      ACCEPT_EULA: \"Y\"\n    ports:\n    - \"1503:1433\"\n    extra_hosts:\n      sqlNode1.lab.local: \"172.16.238.21\"\n      sqlNode2.lab.local: \"172.16.238.22\"\n    networks:\n        internal:\n                ipv4_address: 172.16.238.23\n\nnetworks:\n    internal:\n      ipam:\n            driver: default\n            config:\n                - subnet: 172.16.238.0\/24<\/pre>\n<p>To up the stack with Docker Compose, we just need to run the command below. By default, it will find the docker-compose.yml file in the relevant directory and will create and up the servers according to the directives here. With the -d parameter at the end of the command, we determine that we want it to run in detached mode, that is, in the background.<\/p>\n<pre class=\"lang:default decode:true \">$ docker-compose up -d\nCreating network \"sql2019hademo_internal\" with the default driver\nCreating sqlNode2 ...\nCreating sqlNode1 ...\nCreating sqlNode2\nCreating sqlNode3 ...\nCreating sqlNode1\nCreating sqlNode2 ... done<\/pre>\n<p>If docker compose is not installed; You can install it with command <code>apt install docker-compose -y<\/code><\/p>\n<pre class=\"lang:default decode:true \">$ docker-compose ps\nName                Command               State           Ports\n--------------------------------------------------------------------------\nsqlNode1   \/bin\/sh -c \/opt\/mssql\/bin\/ ...   Up      0.0.0.0:1501-&gt;1433\/tcp\nsqlNode2   \/bin\/sh -c \/opt\/mssql\/bin\/ ...   Up      0.0.0.0:1502-&gt;1433\/tcp\nsqlNode3   \/bin\/sh -c \/opt\/mssql\/bin\/ ...   Up      0.0.0.0:1503-&gt;1433\/tcp<\/pre>\n<p>The above command displays containers created with docker compose. Now our hosts are up and accessible. For the installation of AlwaysOn AG, we can make the necessary checks by accessing from SSMS or from the terminal.<\/p>\n<p>We run the command below to get the ip address of the host where the docker is located.<\/p>\n<pre class=\"lang:default decode:true \">$ ifconfig\nens33: flags=4163&lt;UP,BROADCAST,RUNNING,MULTICAST&gt;  mtu 1500\n        inet 192.168.72.176  netmask 255.255.255.0  broadcast 192.168.72.255\n..<\/pre>\n<p>We can access our SQL Server nodes via 192.168.72.176 and 1501, 1502 and 1503 ports respectively.<\/p>\n<p>The Linux icon next to the nodes is attracted your attention? \ud83d\ude42<\/p>\n<p id=\"dSoablp\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15597  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/06\/img_5edf73d9451fa.png\" alt=\"\" width=\"508\" height=\"874\" \/><\/p>\n<p>In the last part, we will complete the AlwaysOn AG installation on Docker Container. In the previous section, we performed the connection test for the containers.<\/p>\n<h2>SQL Server 2019 AlwaysOn Availability Group on Docker Container Part 3<\/h2>\n<p>By connecting to the primary node, that is, the node with port 1501, we will create login, master key and certificate with the following script.<\/p>\n<p>We extract the certificate and private key to \/tmp\/dbm_certificate.cer and \/tmp\/dbm_certificate.pvk files.<\/p>\n<p>We will copy these files to other nodes and create master keys and certificates according to these files:<\/p>\n<pre class=\"lang:default decode:true \">USE master\nGO\n \nCREATE LOGIN dbm_login WITH PASSWORD = 'MyStr0ngPa$w0rd';\nCREATE USER dbm_user FOR LOGIN dbm_login;\nGO\n \nCREATE MASTER KEY ENCRYPTION BY PASSWORD = 'MyStr0ngPa$w0rd';\ngo\nCREATE CERTIFICATE dbm_certificate WITH SUBJECT = 'dbm';\nBACKUP CERTIFICATE dbm_certificate\nTO FILE = '\/tmp\/dbm_certificate.cer'\nWITH PRIVATE KEY (\n        FILE = '\/tmp\/dbm_certificate.pvk',\n        ENCRYPTION BY PASSWORD = 'MyStr0ngPa$w0rd'\n    );\nGO<\/pre>\n<p>We will copy the files with cer and pvk extensions from the container to other nodes by running the following commands on the Docker host:<\/p>\n<pre class=\"lang:default decode:true \">$ docker cp sqlNode1:\/tmp\/dbm_certificate.cer .\n$ docker cp sqlNode1:\/tmp\/dbm_certificate.pvk .\n$ docker cp dbm_certificate.cer sqlNode2:\/tmp\/\n$ docker cp dbm_certificate.pvk sqlNode2:\/tmp\/\n$ docker cp dbm_certificate.cer sqlNode3:\/tmp\/\n$ docker cp dbm_certificate.pvk sqlNode3:\/tmp\/<\/pre>\n<p>We connect to secondary nodes.(secondary nodes works on ports 1502 and 1503). We create login, master key and certificate by running the following scripts:<\/p>\n<pre class=\"lang:default decode:true \">CREATE LOGIN dbm_login WITH PASSWORD = 'MyStr0ngPa$w0rd';\nCREATE USER dbm_user FOR LOGIN dbm_login;\nGO\n \nCREATE MASTER KEY ENCRYPTION BY PASSWORD = 'MyStr0ngPa$w0rd';\nGO\nCREATE CERTIFICATE dbm_certificate   \n    AUTHORIZATION dbm_user\n    FROM FILE = '\/tmp\/dbm_certificate.cer'\n    WITH PRIVATE KEY (\n    FILE = '\/tmp\/dbm_certificate.pvk',\n    DECRYPTION BY PASSWORD = 'MyStr0ngPa$w0rd'\n);\nGO<\/pre>\n<p>We run the following script on all nodes to create endpoints for AlwaysOn:<\/p>\n<pre class=\"lang:default decode:true \">CREATE ENDPOINT [Hadr_endpoint]\n    AS TCP (LISTENER_IP = (0.0.0.0), LISTENER_PORT = 5022)\n    FOR DATA_MIRRORING (\n        ROLE = ALL,\n        AUTHENTICATION = CERTIFICATE dbm_certificate,\n        ENCRYPTION = REQUIRED ALGORITHM AES\n        );\nALTER ENDPOINT [Hadr_endpoint] STATE = STARTED;\nGRANT CONNECT ON ENDPOINT::[Hadr_endpoint] TO [dbm_login];\nGO<\/pre>\n<p>To enable the extended event session of AlwaysOn in all nodes at startup:<\/p>\n<pre class=\"lang:default decode:true \">ALTER EVENT SESSION  AlwaysOn_health ON SERVER WITH (STARTUP_STATE=ON);\nGO<\/pre>\n<p>We run the script below to create a availability group in the primary node. Note that the CLUSTER_TYPE = NONE option was chosen because it was installed without a cluster management platform like Pacemaker or Windows Server Failover Cluster.<\/p>\n<p>If you are going to install AlwaysOn AG on Linux, you should choose CLUSTER_TYPE = EXTERNAL for Pacemaker:<\/p>\n<pre class=\"lang:default decode:true\">CREATE AVAILABILITY GROUP [AG1]\n        WITH (CLUSTER_TYPE = NONE)\n        FOR REPLICA ON\n        N'sqlNode1'\n            WITH (\n            ENDPOINT_URL = N'tcp:\/\/sqlNode1:5022',\n            AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT,\n                SEEDING_MODE = AUTOMATIC,\n                FAILOVER_MODE = MANUAL,\n            SECONDARY_ROLE (ALLOW_CONNECTIONS = ALL)\n                ),\n        N'sqlNode2'\n            WITH (\n            ENDPOINT_URL = N'tcp:\/\/sqlNode2:5022',\n            AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT,\n                SEEDING_MODE = AUTOMATIC,\n                FAILOVER_MODE = MANUAL,\n            SECONDARY_ROLE (ALLOW_CONNECTIONS = ALL)\n                ),\n        N'sqlNode3'\n            WITH (\n            ENDPOINT_URL = N'tcp:\/\/sqlNode3:5022',\n            AVAILABILITY_MODE = ASYNCHRONOUS_COMMIT,\n                SEEDING_MODE = AUTOMATIC,\n                FAILOVER_MODE = MANUAL,\n            SECONDARY_ROLE (ALLOW_CONNECTIONS = ALL)\n                );\nGO<\/pre>\n<p>We will join secondary nodes to AG:<\/p>\n<pre class=\"lang:default decode:true \">ALTER AVAILABILITY GROUP [ag1] JOIN WITH (CLUSTER_TYPE = NONE);\nALTER AVAILABILITY GROUP [ag1] GRANT CREATE ANY DATABASE;\nGO<\/pre>\n<p>After joining the secondary nodes, we will create a new database on the primary node and add it to the AG:<\/p>\n<pre class=\"lang:default decode:true \">CREATE DATABASE agtestdb;\nGO\nALTER DATABASE agtestdb SET RECOVERY FULL;\nGO\nBACKUP DATABASE agtestdb TO DISK = '\/var\/opt\/mssql\/data\/agtestdb.bak';\nGO\nALTER AVAILABILITY GROUP [ag1] ADD DATABASE [agtestdb];\nGO<\/pre>\n<p>Finally, we check the status of the AG on the AlwaysOn Availability Groups Dashboard:<\/p>\n<p id=\"vhDdjVh\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-15598  aligncenter\" src=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/06\/img_5edf76e5acb23.png\" alt=\"\" width=\"808\" height=\"663\" \/><\/p>\n<p>Thus, we have completed the Always On availability group installation on Docker Container.<\/p>\n<p>As additional information; When you install with &#8220;CLUSTER_TYPE = NONE&#8221;, if you want to perform failover, you need to make a controlled failover with the command below. But first you should check that the last commit time of the secondary node you want to perform failover.<\/p>\n<pre class=\"lang:default decode:true\">ALTER AVAILABILITY GROUP [ag1] FORCE_FAILOVER_ALLOW_DATA_LOSS<\/pre>\n<p>Now we can down stack with Docker compose.<\/p>\n<pre class=\"lang:default decode:true \">$ docker-compose down\nStopping sqlNode1 ... done\nStopping sqlNode3 ... done\nStopping sqlNode2 ... done\nRemoving sqlNode1 ... done\nRemoving sqlNode3 ... done\nRemoving sqlNode2 ... done\nRemoving network sql2019hademo_internal<\/pre>\n<p>See you, stay healthy.<\/p>\n<p>Resources used:<\/p>\n<ol>\n<li>https:\/\/docs.microsoft.com\/en-us\/sql\/linux\/quickstart-install-connect-docker?view=sql-server-ver15<\/li>\n<li>https:\/\/docs.microsoft.com\/en-us\/sql\/linux\/quickstart-install-connect-ubuntu?view=sql-server-ver15<\/li>\n<li>https:\/\/docs.microsoft.com\/en-us\/sql\/linux\/sql-server-linux-create-availability-group?view=sql-server-ver15<\/li>\n<li>https:\/\/docs.microsoft.com\/en-us\/sql\/linux\/sql-server-linux-configure-mssql-conf?view=sql-server-ver15<\/li>\n<li>https:\/\/docs.microsoft.com\/en-us\/sql\/linux\/sql-server-linux-configure-environment-variables?view=sql-server-ver15<\/li>\n<li>https:\/\/docs.microsoft.com\/en-us\/sql\/linux\/sql-server-linux-availability-group-cluster-ubuntu?view=sql-server-linux-ver15<\/li>\n<li>https:\/\/docs.docker.com\/engine\/install\/ubuntu\/<\/li>\n<li>https:\/\/docs.docker.com\/compose\/<\/li>\n<\/ol>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_15596\" class=\"pvc_stats all  \" data-element-id=\"15596\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>SQL Server 2019 AlwaysOn Availability Group on Docker Container Part 1 SQL Server started to support Linux with the 2016 version. Along with the 2017 and 2019 versions, it started to support HA\/DR, Kubernetes and Big Data Cluster solutions on Linux and Container platforms. In this article, we will install SQL Server 2019 on Docker &hellip;<\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_15596\" class=\"pvc_stats all  \" data-element-id=\"15596\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"https:\/\/dbtut.com\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":488,"featured_media":15601,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[7447,3],"tags":[9625,9624,9630,9632,9628,9631,9634,9638,9637,9633,9629,9627,9636,9626,9635],"class_list":["post-15596","post","type-post","status-publish","format-standard","has-post-thumbnail","","category-docker","category-mssql","tag-availability-group-on-docker","tag-availability-group-on-docker-container","tag-docker-microsoft-sql","tag-docker-mssql-connect","tag-docker-mssql-linux","tag-docker-mssql-linux-volume","tag-docker-mssql-server-volume","tag-docker-sql-server-developer-edition","tag-docker-sql-server-express","tag-docker-sql-server-ip-address","tag-microsoft-sql-server-for-linux","tag-mssql-docker-compose","tag-mssql-server-linux-container","tag-msssql-docker","tag-sql-server-docker"],"aioseo_notices":[],"a3_pvc":{"activated":true,"total_views":5912,"today_views":0},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SQL Server 2019 AlwaysOn Availability Group on Docker Containers - Database Tutorials<\/title>\n<meta name=\"description\" content=\"SQL Server 2019 AlwaysOn Availability Group on Docker Container\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SQL Server 2019 AlwaysOn Availability Group on Docker Containers - Database Tutorials\" \/>\n<meta property=\"og:description\" content=\"SQL Server 2019 AlwaysOn Availability Group on Docker Container\" \/>\n<meta property=\"og:url\" content=\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/\" \/>\n<meta property=\"og:site_name\" content=\"Database Tutorials\" \/>\n<meta property=\"article:published_time\" content=\"2020-06-09T19:45:26+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-06-09T19:46:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/06\/Ads\u0131z-2.png\" \/>\n\t<meta property=\"og:image:width\" content=\"949\" \/>\n\t<meta property=\"og:image:height\" content=\"419\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Emrah Erdo\u011fan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Emrah Erdo\u011fan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"14 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/\"},\"author\":{\"name\":\"Emrah Erdo\u011fan\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/8f8a36bd455de4bb3f6db0427bbde1ab\"},\"headline\":\"SQL Server 2019 AlwaysOn Availability Group on Docker Containers\",\"datePublished\":\"2020-06-09T19:45:26+00:00\",\"dateModified\":\"2020-06-09T19:46:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/\"},\"wordCount\":1301,\"commentCount\":6,\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/06\/Ads\u0131z-2.png\",\"keywords\":[\"Availability Group on Docker\",\"Availability Group on Docker Container\",\"Docker microsoft sql\",\"Docker mssql connect\",\"Docker mssql Linux\",\"Docker mssql Linux volume\",\"Docker mssql server volume\",\"Docker sql server developer edition\",\"Docker SQL Server Express\",\"Docker sql server ip address\",\"Microsoft sql server for linux\",\"Mssql docker-compose\",\"Mssql server linux container\",\"Msssql docker\",\"sql server docker\"],\"articleSection\":[\"Docker\",\"MSSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/\",\"url\":\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/\",\"name\":\"SQL Server 2019 AlwaysOn Availability Group on Docker Containers - Database Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/dbtut.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/06\/Ads\u0131z-2.png\",\"datePublished\":\"2020-06-09T19:45:26+00:00\",\"dateModified\":\"2020-06-09T19:46:39+00:00\",\"description\":\"SQL Server 2019 AlwaysOn Availability Group on Docker Container\",\"breadcrumb\":{\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#primaryimage\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/06\/Ads\u0131z-2.png\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/06\/Ads\u0131z-2.png\",\"width\":949,\"height\":419},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/dbtut.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SQL Server 2019 AlwaysOn Availability Group on Docker Containers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/dbtut.com\/#website\",\"url\":\"https:\/\/dbtut.com\/\",\"name\":\"Database Tutorials\",\"description\":\"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux\",\"publisher\":{\"@id\":\"https:\/\/dbtut.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/dbtut.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/dbtut.com\/#organization\",\"name\":\"dbtut\",\"url\":\"https:\/\/dbtut.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"contentUrl\":\"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg\",\"width\":223,\"height\":36,\"caption\":\"dbtut\"},\"image\":{\"@id\":\"https:\/\/dbtut.com\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/8f8a36bd455de4bb3f6db0427bbde1ab\",\"name\":\"Emrah Erdo\u011fan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/dbtut.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/a23ad74b2dfb1a2f7ca3216abca47df06e0c4ba93d074f56c6efe140ed8a8fa5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/a23ad74b2dfb1a2f7ca3216abca47df06e0c4ba93d074f56c6efe140ed8a8fa5?s=96&d=mm&r=g\",\"caption\":\"Emrah Erdo\u011fan\"},\"url\":\"https:\/\/dbtut.com\/index.php\/author\/emraherdogan\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SQL Server 2019 AlwaysOn Availability Group on Docker Containers - Database Tutorials","description":"SQL Server 2019 AlwaysOn Availability Group on Docker Container","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:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/","og_locale":"en_US","og_type":"article","og_title":"SQL Server 2019 AlwaysOn Availability Group on Docker Containers - Database Tutorials","og_description":"SQL Server 2019 AlwaysOn Availability Group on Docker Container","og_url":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/","og_site_name":"Database Tutorials","article_published_time":"2020-06-09T19:45:26+00:00","article_modified_time":"2020-06-09T19:46:39+00:00","og_image":[{"width":949,"height":419,"url":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/06\/Ads\u0131z-2.png","type":"image\/png"}],"author":"Emrah Erdo\u011fan","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Emrah Erdo\u011fan","Est. reading time":"14 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#article","isPartOf":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/"},"author":{"name":"Emrah Erdo\u011fan","@id":"https:\/\/dbtut.com\/#\/schema\/person\/8f8a36bd455de4bb3f6db0427bbde1ab"},"headline":"SQL Server 2019 AlwaysOn Availability Group on Docker Containers","datePublished":"2020-06-09T19:45:26+00:00","dateModified":"2020-06-09T19:46:39+00:00","mainEntityOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/"},"wordCount":1301,"commentCount":6,"publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/06\/Ads\u0131z-2.png","keywords":["Availability Group on Docker","Availability Group on Docker Container","Docker microsoft sql","Docker mssql connect","Docker mssql Linux","Docker mssql Linux volume","Docker mssql server volume","Docker sql server developer edition","Docker SQL Server Express","Docker sql server ip address","Microsoft sql server for linux","Mssql docker-compose","Mssql server linux container","Msssql docker","sql server docker"],"articleSection":["Docker","MSSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/","url":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/","name":"SQL Server 2019 AlwaysOn Availability Group on Docker Containers - Database Tutorials","isPartOf":{"@id":"https:\/\/dbtut.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#primaryimage"},"image":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#primaryimage"},"thumbnailUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/06\/Ads\u0131z-2.png","datePublished":"2020-06-09T19:45:26+00:00","dateModified":"2020-06-09T19:46:39+00:00","description":"SQL Server 2019 AlwaysOn Availability Group on Docker Container","breadcrumb":{"@id":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#primaryimage","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/06\/Ads\u0131z-2.png","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2020\/06\/Ads\u0131z-2.png","width":949,"height":419},{"@type":"BreadcrumbList","@id":"https:\/\/dbtut.com\/index.php\/2020\/06\/09\/sql-server-2019-alwayson-availability-group-on-docker-containers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/dbtut.com\/"},{"@type":"ListItem","position":2,"name":"SQL Server 2019 AlwaysOn Availability Group on Docker Containers"}]},{"@type":"WebSite","@id":"https:\/\/dbtut.com\/#website","url":"https:\/\/dbtut.com\/","name":"Database Tutorials","description":"MSSQL, Oracle, PostgreSQL, MySQL, MariaDB, DB2, Sybase, Teradata, Big Data, NOSQL, MongoDB, Couchbase, Cassandra, Windows, Linux","publisher":{"@id":"https:\/\/dbtut.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/dbtut.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/dbtut.com\/#organization","name":"dbtut","url":"https:\/\/dbtut.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/","url":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","contentUrl":"https:\/\/dbtut.com\/wp-content\/uploads\/2021\/02\/dbtutlogo.jpg","width":223,"height":36,"caption":"dbtut"},"image":{"@id":"https:\/\/dbtut.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/dbtut.com\/#\/schema\/person\/8f8a36bd455de4bb3f6db0427bbde1ab","name":"Emrah Erdo\u011fan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/dbtut.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/a23ad74b2dfb1a2f7ca3216abca47df06e0c4ba93d074f56c6efe140ed8a8fa5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a23ad74b2dfb1a2f7ca3216abca47df06e0c4ba93d074f56c6efe140ed8a8fa5?s=96&d=mm&r=g","caption":"Emrah Erdo\u011fan"},"url":"https:\/\/dbtut.com\/index.php\/author\/emraherdogan\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/15596","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/users\/488"}],"replies":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/comments?post=15596"}],"version-history":[{"count":0,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/posts\/15596\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media\/15601"}],"wp:attachment":[{"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/media?parent=15596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/categories?post=15596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dbtut.com\/index.php\/wp-json\/wp\/v2\/tags?post=15596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}