SQL Server 2017 on Windows containers – Part 1

I have got various opportunities to work with the datacenter folks who maintain the SQL server environments along with other applications. One of the major challenge they face is, patching and maintaining these servers. With the advent of virtualization and Cloud technology, virtual machine is one of  the preferences to install the enterprise application. They maintain servers and patching , installing Antivirus or other relevant software regularly. System center makes these tasks really easy however, still it takes 20-30% of their working hours to do these activities.

There are multiple challenges faced by the datacenter staff:

1. Install entire OS from the scratch in the VMs and then install SQL server on top of it

2.  Install antivirus and software on each VM

3.  Patch each of the VMs and then monitor and manage those

This concept of containers caters to these pain areas. *It’s a soft layer of virtualization in which you don’ t need to install a separate virtual machine for each environment. You can still install container image on the host OS. Container image will share the same kernel with the host machine. It helps to save lots of efforts and resources for large environments. However, the pros and cons are debatable for both the approaches in terms of security and isolation.

*Note – You can still install container images in Hyper-V mode on the top of the host OS. It fits well for multi tenant systems where the kernel of OS needs to be separate.

Before we get into SQL server installation, it’s really important to understand how containers work.  As per the picture below, for installing virtual machine –


1. Operating system, device drivers , antivirus etc. are need to installed separately and then the  actual application like SQL server will be installed

2. To start SQL server, first we will need to boot the VM and then start the application and it’s a long process and spending of lots of time and resources.

3. Lots of memory and CPU cycles are spent in the process of booting and keeping the OS up and running

However, with containers – it’s much simpler

1. Just install container on the top of Host OS and there is no need to install the VM and OS separately

2. Very quick to boot up the image as there is no need to load whole bunch of OS binaries. It’s available only with Windows Nano server or core edition

3. Saves lots of CPU cycles and memory and it’s easier to maintain

Let’s try to understand, what are containers and how SQL server 2017 can be installed on top of it.

Common Jargon which is used to talk about containers:

  • Docker Engine
  • Containers
  • Image
  • Dockers Hub

Docker Engine– Dockers inc. is the company which started the concept of docker in 2013. Hypervisor is to virtual machine which Docker engine is to the container. It’s an open source technology open for the community contribution.  It’s the core technology to manage container images as well as starting and stopping containers. Everything else like clustering, security or orchestration is built around this technology.  Docker engine is required to installed to manage the dockers on Windows and Linux.

Containers – Containers , logically are like virtual machine, are soft virtualization layer running on top of host OS. They share the kernel of host OS. Moreover, there is an option to install those on hyper-v machine and preferred for the application which have to be isolated.

Images – Image technically is the template you use to spin up the containers. Image will have it’s base OS and then on top of it the application which you want to use and the sandbox which will capture the changes. Once the container is stopped, it can be converted to image by applying the changes in the sandbox.


Docker Hub – It’s the repository where you can put the images of your own or download the images publically available.

Let’s learn in the next posts, how to configure container on Windows and Linux OS on Windows 10 host.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s