{"id":11316,"date":"2018-06-06T08:49:13","date_gmt":"2018-06-06T06:49:13","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/"},"modified":"2023-07-17T16:59:30","modified_gmt":"2023-07-17T14:59:30","slug":"dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/","title":{"rendered":"Dealing with ugrade scenarios for SQL Server on Docker and Swarm"},"content":{"rendered":"<p>This blog post comes from an interesting experience with one customer about upgrading SQL Server on a Docker environment. Let\u2019s set quickly the context: a production environment that includes a standalone Docker engine on the top of openSUSE Linux distribution with some SQL Server 2017 Linux containers. The deal was to update those SQL Server instances from 2017 CU1 to 2017 CU7.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24230\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-0-banner-update-sql-docker.jpg\" alt=\"blog 137 - 0 - banner update sql docker\" width=\"262\" height=\"137\" \/><\/p>\n<p>The\u00a0point is we applied the same kind of upgrades\u00a0earlier on the morning\u00a0but it concerned virtual environments with SQL Server 2017 on Windows Server 2016. As you already guessed, we cannot go on the same way with SQL Server containers. The good news is that the <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/linux\/sql-server-linux-configure-docker?view=sql-server-linux-2017\" target=\"_blank\" rel=\"noopener noreferrer\">procedure<\/a> is fully documented by Microsoft but let\u2019s\u00a0focus on\u00a0my customer\u2019s question: Can we achieve rolling upgrades with SQL Server containers? Rolling upgrade in this context may be defined as keeping the existing system running while we each component. Referring to the context of this customer the quick answer is no because\u00a0they manage\u00a0the standalone instances. However, we may hope to be as closed as possible to the existing rolling upgrade scenarios\u00a0with SQL Server HA capabilities but it is pretty limited currently on Docker and didn&#8217;t make sense in this specific\u00a0context.<\/p>\n<p>In addition, let\u2019s say that my customer spins up SQL Server containers by running <em>docker run<\/em> command. In this case, we had no choice to re-create the concerned containers with the new image. So basically,\u00a0according to\u00a0the Microsoft documentation, the game will consist of the following main steps:<\/p>\n<ul>\n<li>To download the latest SQL Server image from the <a href=\"https:\/\/docs.microsoft.com\/en-us\/sql\/linux\/sql-server-linux-configure-docker?view=sql-server-linux-2017\" target=\"_blank\" rel=\"noopener noreferrer\">Microsoft docker hub<\/a>.<\/li>\n<li>To ensure we are using persistent volumes with SQL Server containers.<\/li>\n<li>To Initiate DB user backups (Keep safe here)<\/li>\n<li>To remove the concerned container<\/li>\n<li>To re-create the container with the same definition but the upgraded based image<\/li>\n<\/ul>\n<p>The aforementioned steps will lead to some SQL Server instance unavailability.<\/p>\n<p>Let\u2019s simulate this scenario on my lab environment with a custom image (but the principle remains the same as my customer).<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[clustadmin@docker1 PROD]$ docker ps\nCONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                    PORTS                    NAMES\naa6b4411e4e4        dbi\/dbi_linux_sql2017:CU4   \".\/entrypoint.sh 'ta\u2026\"   22 minutes ago      Up 22 minutes (healthy)   0.0.0.0:1433-&gt;1433\/tcp   prod_db_1\n153b1cc0bbe0        registry:2                  \"\/entrypoint.sh \/etc\u2026\"   6 weeks ago         Up About an hour          5000\/tcp                 registry.1.pevhlfmsailjx889ktats1fnh<\/pre>\n<p>The first docker container concerns my SQL Server instance with a custom base image <em>dbi\/dbi_linux_sql2017:CU4<\/em>. My environment includes also one user database <em>dbi_tools<\/em> and some related external objects as SQL Server jobs and additional logins &#8211; <em>dbi<\/em> and <em>test<\/em> logins. A simplified representation of my customer scenario &#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-24219 size-full\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-0-mssql-cli-sql-version-e1528272596261.jpg\" alt=\"blog 137 - 0 - mssql-cli sql version\" width=\"800\" height=\"184\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-24220 size-full\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-2-mssql-cli-sql-login-e1528272755228.jpg\" alt=\"blog 137 - 2 - mssql-cli sql login\" width=\"700\" height=\"177\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-24222 size-full\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-1-mssql-cli-user-db-e1528272731838.jpg\" alt=\"blog 137 - 1 - mssql-cli user db\" width=\"300\" height=\"100\" \/><\/p>\n<p>So, the challenge here is to upgrade the current container running on SQL Server 2017 CU4 with the last SQL Server 2017 CU7. The first step will consist in upgrading the <em>dbi\/dbi_linuxsql2017:CU4<\/em> image. Note I will use docker-compose in the next part of\u00a0my demo but we\u2019ll achieve exactly the same goal differently. So, let\u2019s modify the FROM command line inside the docker file line as follows:<\/p>\n<pre class=\"brush: xml; gutter: true; first-line: 1\"># set the base image (2017 version)\n# &gt; CU4 includes SQL Server agent now\nFROM microsoft\/mssql-server-linux:2017-CU7<\/pre>\n<p>Then let\u2019s run a docker-compose command with the following docker-compose input file in order to generate a new fresh SQL Server image (CU7). The interesting part of my docker-compose file:<\/p>\n<pre class=\"brush: xml; gutter: true; first-line: 1\">version: '3.1'\nservices:\n  db: \n    build: .\n    image: dbi\/dbi_linux_sql2017:CU7\n\u2026<\/pre>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[clustadmin@docker1 PROD]$ docker-compose build<\/pre>\n<p>Let\u2019s take a look at the existing docker images:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[clustadmin@docker1 PROD]$ docker images\nREPOSITORY                                   TAG                    IMAGE ID            CREATED             SIZE\ndbi\/dbi_linux_sql2017                        CU7                    0b4d23626dae        44 minutes ago      1.43GB\ndbi\/dbi_linux_sql2017                        CU4                    0db4694645ec        About an hour ago   1.42GB\n\u2026<\/pre>\n<p>My new image has been created successfully. We may also notice 2 images now: the current one (with CU4 tag) and the new one (with CU7 tag)<\/p>\n<p>Obviously persistent volumes are an important part of the customer architecture, so I also simulated some volume mappings inside my docker-compose file.<\/p>\n<pre class=\"brush: xml; gutter: true; first-line: 1\">version: '3.1'\nservices:\n  db:\n    build: .\n    image: dbi\/dbi_linux_sql2017:CU7\n    #container_name: dbi_linux_sql2017_cu4\n    ports:\n      - \"1433:1433\"\n    volumes:\n      - \/u00\/db2:\/u00\n      - \/u01\/db2:\/u01\n      - \/u02\/db2:\/u02\n      - \/u03\/db2:\/u03\n      - \/u98\/db2:\/u98\nenvironment:\n      - MSSQL_SA_PASSWORD=Password1\n      - ACCEPT_EULA=Y\n      - MSSQL_PID=Developer\n      - MSSQL_USER=dbi\n      - MSSQL_USER_PASSWORD=Password1\n      - TZ=Europe\/Berlin<\/pre>\n<p>Let&#8217;s move forward to the next step that consists in removing the current SQL Server 2017 CU4 container (prod_db_1):<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[clustadmin@docker1 PROD]$ docker stop prod_db_1 &amp;&amp; docker rm prod_db_1\nprod_db_1\nprod_db_1<\/pre>\n<p>And finally let\u2019s spin up a new container based on the new image (SQL Server 2017 CU7)<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[clustadmin@docker1 PROD]$ docker-compose up -d<\/pre>\n<p>Just out of curiosity, a quick look at the docker log output command reveals some related records concerning the upgrade process:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">2018-06-04 22:45:43.79 spid7s      Configuration option 'allow updates' changed from 1 to 0. Run the RECONFIGURE statement to install.\n2018-06-04 22:45:43.80 spid7s\n2018-06-04 22:45:43.80 spid7s      -----------------------------------------\n2018-06-04 22:45:43.80 spid7s      Execution of PRE_SQLAGENT100.SQL complete\n2018-06-04 22:45:43.80 spid7s      -----------------------------------------\n2018-06-04 22:45:43.81 spid7s      DMF pre-upgrade steps...\n2018-06-04 22:45:44.09 spid7s      DC pre-upgrade steps...\n2018-06-04 22:45:44.09 spid7s      Check if Data collector config table exists...\n\u2026\n2018-06-04 22:45:59.39 spid7s      ------------------------------------\n2018-06-04 22:45:59.39 spid7s      Execution of InstDac.SQL complete\n2018-06-04 22:45:59.39 spid7s      ------------------------------------\n2018-06-04 22:45:59.40 spid7s      -----------------------------------------\n2018-06-04 22:45:59.40 spid7s      Starting execution of EXTENSIBILITY.SQL\n2018-06-04 22:45:59.40 spid7s      -----------------------------------------\n2018-06-04 22:45:59.40 spid7s      -----------------------------------------\n2018-06-04 22:45:59.40 spid7s      Finished execution of EXTENSIBILITY.SQL\n2018-06-04 22:45:59.41 spid7s      -----------------------------------------\n2018-06-04 22:45:59.44 spid7s      Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.\n2018-06-04 22:45:59.44 spid7s      Configuration option 'show advanced options' changed from 1 to 1. Run the RECONFIGURE statement to install.\n2018-06-04 22:45:59.45 spid7s      Configuration option 'Agent XPs' changed from 1 to 1. Run the RECONFIGURE statement to install.\n2018-06-04 22:45:59.45 spid7s      Configuration option 'Agent XPs' changed from 1 to 1. Run the RECONFIGURE statement to install.\n2018-06-04 22:45:59.53 spid7s      Dropping view [dbo].[sysutility_ucp_configuration]\n2018-06-04 22:45:59.53 spid7s      Creating view [dbo].[sysutility_ucp_configuration]...\n2018-06-04 22:45:59.54 spid7s      Dropping view [dbo].[sysutility_ucp_policy_configuration]\n2018-06-04 22:45:59.54 spid7s      Creating view [dbo].[sysutility_ucp_policy_configuration]...\n2018-06-04 22:45:59.55 spid7s      Dropping [dbo].[fn_sysutility_get_is_instance_ucp]\n\u2026.<\/pre>\n<p>The container has restarted correctly with the new based image as show below:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[clustadmin@docker1 PROD]$ docker ps\nCONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                             PORTS                    NAMES\na17800f70fff        dbi\/dbi_linux_sql2017:CU7   \".\/entrypoint.sh 'ta\u2026\"   4 minutes ago       Up 33 seconds (health: starting)   0.0.0.0:1433-&gt;1433\/tcp   prod_db_1\n153b1cc0bbe0        registry:2                  \"\/entrypoint.sh \/etc\u2026\"   6 weeks ago         Up 2 hours                         5000\/tcp                 registry.1.pevhlfmsailjx889ktats1fnh<\/pre>\n<p>Let\u2019s check the new SQL Server version and if all my objects are still present:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-24224 size-full\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-3-mssql-cli-sql-version-e1528273677984.jpg\" alt=\"blog 137 - 3 - mssql-cli sql version\" width=\"700\" height=\"165\" \/><\/p>\n<p>The upgrade\u00a0seems to be\u00a0done successfully and all existing objects previous the upgrade operation still exist:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-24225 size-full\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-4-mssql-cli-sql-objects-e1528273665824.jpg\" alt=\"blog 137 - 4 - mssql-cli sql objects\" width=\"700\" height=\"350\" \/><\/p>\n<p>Great job! But let\u2019s go beyond to this procedure with the following question: Could we have done better here? From a process perspective, the response is probably yes but we have to rely on more sophisticated features provided by Swarm mode (or other orchestrators as K8s) as service deployment that will make the upgrade procedure drastically easier. But don\u2019t get me wrong here. Even in Swarm mode or other orchestrators, we are not still able to guarantee the zero down time but we may perform the upgrade faster to be very close to the target.<\/p>\n<p>Previously I used <em>docker-compose<\/em> to spin up my SQL Server container. Now let\u2019s\u00a0use this counterpart\u00a0on a Docker Swarm environment.<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[clustadmin@docker1 PROD]$ docker info | grep -i swarm\nSwarm: active\n\n[clustadmin@docker1 PROD]$ docker node ls\nID                            HOSTNAME                    STATUS              AVAILABILITY        MANAGER STATUS\nhzwjpb9rtstwfex3zsbdnn5yo *   docker1.dbi-services.test   Ready               Active              Leader\nq09k7pqe940qvv4c1jprzk2yv     docker2.dbi-services.test   Ready               Active\nc9burq3qn4iwwbk28wrpikqra     docker3.dbi-services.test   Ready               Active<\/pre>\n<p>I already prepared a stack deployment that includes a task\u00a0related to my SQL Server instance (2017 CU4):<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[clustadmin@docker1 PROD]$ docker service ls\nID                  NAME                MODE                REPLICAS            IMAGE                       PORTS\n2bmomzq0inu8        dbi_db              replicated          1\/1                 dbi\/dbi_linux_sql2017:CU4   *:1433-&gt;1433\/tcp\n[clustadmin@docker1 PROD]$ docker service ps dbi_db\nID                  NAME                IMAGE                       NODE                        DESIRED STATE       CURRENT STATE           ERROR               PORTS\nrbtbkcz0cy8o        dbi_db.1            dbi\/dbi_linux_sql2017:CU4   docker1.dbi-services.test   Running<\/pre>\n<p>A quick connection to the concerned SQL Server instance confirms we run on SQL Server 2017 CU4:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-24226\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-5-mssql-cli-sql-version-swarm-e1528273928267.jpg\" alt=\"blog 137 - 5- mssql-cli sql version swarm\" width=\"700\" height=\"267\" \/><\/p>\n<p>Now\u00a0go ahead and let&#8217;s perform the same\u00a0upgrade we&#8217;ve done previously (2017 CU7). In this case\u00a0the game will consist in updating the corresponding docker-compose file with the new image as follows (I put only the interesting sample of my docker-compose file):<\/p>\n<pre class=\"brush: xml; gutter: true; first-line: 1\">version: '3.1'\nservices:\n  db: \n    build: .\n    image: dbi\/dbi_linux_sql2017:CU7\n\u2026<\/pre>\n<p>\u2026 and then I just have give the new definition of my docker-compose file as input of my stack deployment as follows:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[clustadmin@docker1 PROD]$ docker stack deploy -c docker-compose.yml dbi\nIgnoring unsupported options: build\n\nUpdating service dbi_db (id: 2bmomzq0inu8q0mwkfff8apm7)\n\u2026<\/pre>\n<p>The system will then perform all the step we previously performed manually in the first test including stopping the old task (container), scheduling the old task\u2019s update with the new image and finally starting the updated container as shown below:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">[clustadmin@docker1 PROD]$ docker service ps dbi_db\nID                  NAME                IMAGE                                  NODE                        DESIRED STATE       CURRENT STATE             ERROR               PORTS\n4zey68lh1gin        dbi_db.1            127.0.0.1:5000\/dbi_linux_sql2017:CU7   docker1.dbi-services.test   Running             Starting 40 seconds ago\nrbtbkcz0cy8o         \\_ dbi_db.1        dbi\/dbi_linux_sql2017:CU4              docker1.dbi-services.test   Shutdown            Shutdown 40 seconds ago<\/pre>\n<p>A quick check of my new SQL Server version:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-24227 size-full\" src=\"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-51-mssql-cli-sql-version-swarm-e1528274261700.jpg\" alt=\"blog 137 - 51- mssql-cli sql version swarm\" width=\"700\" height=\"191\" \/><\/p>\n<p>That\u2019s it!<\/p>\n<p>In this blog post, I hope I managed to get you interested in using swarm mode in such case. Next time I will talk about SQL Server upgrade scenarios on K8s that is a little bit different.<\/p>\n<p>Stay tuned!<\/p>\n<p><span style=\"float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: Georgia,'Times New Roman','Bitstream Charter',Times,serif; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none;\">By David Barbarin<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This blog post comes from an interesting experience with one customer about upgrading SQL Server on a Docker environment. Let\u2019s set quickly the context: a production environment that includes a standalone Docker engine on the top of openSUSE Linux distribution with some SQL Server 2017 Linux containers. The deal was to update those SQL Server [&hellip;]<\/p>\n","protected":false},"author":26,"featured_media":11318,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[601,73,1371,1346,1158,1275],"type_dbi":[],"class_list":["post-11316","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-database-administration-monitoring","tag-docker","tag-linux","tag-rolling-upgrade","tag-sqlserver","tag-sqlserver-2017","tag-swarm"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Dealing with ugrade scenarios for SQL Server on Docker and Swarm - dbi 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.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dealing with ugrade scenarios for SQL Server on Docker and Swarm\" \/>\n<meta property=\"og:description\" content=\"This blog post comes from an interesting experience with one customer about upgrading SQL Server on a Docker environment. Let\u2019s set quickly the context: a production environment that includes a standalone Docker engine on the top of openSUSE Linux distribution with some SQL Server 2017 Linux containers. The deal was to update those SQL Server [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-06T06:49:13+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-17T14:59:30+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-0-mssql-cli-sql-version-e1528272596261.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"184\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Microsoft Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Microsoft Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/\"},\"author\":{\"name\":\"Microsoft Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/bfab48333280d616e1170e7369df90a4\"},\"headline\":\"Dealing with ugrade scenarios for SQL Server on Docker and Swarm\",\"datePublished\":\"2018-06-06T06:49:13+00:00\",\"dateModified\":\"2023-07-17T14:59:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/\"},\"wordCount\":976,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/blog-137-0-mssql-cli-sql-version-e1528272596261.jpg\",\"keywords\":[\"Docker\",\"Linux\",\"Rolling upgrade\",\"SQLServer\",\"sqlserver 2017\",\"Swarm\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/\",\"name\":\"Dealing with ugrade scenarios for SQL Server on Docker and Swarm - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/blog-137-0-mssql-cli-sql-version-e1528272596261.jpg\",\"datePublished\":\"2018-06-06T06:49:13+00:00\",\"dateModified\":\"2023-07-17T14:59:30+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/bfab48333280d616e1170e7369df90a4\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/blog-137-0-mssql-cli-sql-version-e1528272596261.jpg\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2022\\\/04\\\/blog-137-0-mssql-cli-sql-version-e1528272596261.jpg\",\"width\":800,\"height\":184},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Dealing with ugrade scenarios for SQL Server on Docker and Swarm\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/bfab48333280d616e1170e7369df90a4\",\"name\":\"Microsoft Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g\",\"caption\":\"Microsoft Team\"},\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/microsoft-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Dealing with ugrade scenarios for SQL Server on Docker and Swarm - dbi 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.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/","og_locale":"en_US","og_type":"article","og_title":"Dealing with ugrade scenarios for SQL Server on Docker and Swarm","og_description":"This blog post comes from an interesting experience with one customer about upgrading SQL Server on a Docker environment. Let\u2019s set quickly the context: a production environment that includes a standalone Docker engine on the top of openSUSE Linux distribution with some SQL Server 2017 Linux containers. The deal was to update those SQL Server [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/","og_site_name":"dbi Blog","article_published_time":"2018-06-06T06:49:13+00:00","article_modified_time":"2023-07-17T14:59:30+00:00","og_image":[{"width":800,"height":184,"url":"http:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-0-mssql-cli-sql-version-e1528272596261.jpg","type":"image\/jpeg"}],"author":"Microsoft Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Microsoft Team","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/"},"author":{"name":"Microsoft Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4"},"headline":"Dealing with ugrade scenarios for SQL Server on Docker and Swarm","datePublished":"2018-06-06T06:49:13+00:00","dateModified":"2023-07-17T14:59:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/"},"wordCount":976,"commentCount":0,"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-0-mssql-cli-sql-version-e1528272596261.jpg","keywords":["Docker","Linux","Rolling upgrade","SQLServer","sqlserver 2017","Swarm"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/","url":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/","name":"Dealing with ugrade scenarios for SQL Server on Docker and Swarm - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/#primaryimage"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/#primaryimage"},"thumbnailUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-0-mssql-cli-sql-version-e1528272596261.jpg","datePublished":"2018-06-06T06:49:13+00:00","dateModified":"2023-07-17T14:59:30+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/#primaryimage","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-0-mssql-cli-sql-version-e1528272596261.jpg","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/sites\/2\/2022\/04\/blog-137-0-mssql-cli-sql-version-e1528272596261.jpg","width":800,"height":184},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/dealing-with-ugrade-scenarios-for-sql-server-on-docker-and-swarm\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Dealing with ugrade scenarios for SQL Server on Docker and Swarm"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/bfab48333280d616e1170e7369df90a4","name":"Microsoft Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c44a1a792c059f24055763aa77d80a244467f6eef724a8bd13db8d4a350b7a4c?s=96&d=mm&r=g","caption":"Microsoft Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/microsoft-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=11316"}],"version-history":[{"count":1,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11316\/revisions"}],"predecessor-version":[{"id":26785,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/11316\/revisions\/26785"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media\/11318"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=11316"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=11316"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=11316"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=11316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}