One of the big announcements from the Microsoft Ignite Conference was SQL Server 2019 being made available for public preview. Public preview means the software isn’t very far from being made generally available (GA) to everyone as a finished product. IT Pros who support SQL Server typically take a look at the new version to investigate features and understand how the software might fit into their environment. In this post I show an easy way for IT pros to try using SQL Server 2019 on a Windows 10 computer running Docker.
Assumption - Docker is already running on your Windows 10 computer. I’m making this assumption to avoid walking through install and setup of Docker on Windows 10.
Step 1. Download the software
Downloading the software is pretty easy, but it requires you know the name and repo location from where it can be retrieved. At the time of this writing, the container label is “vNext-CTP2.0-ubuntu“ and it can be found on docker hub at “docker pull mcr.microsoft.com/mssql/server .”
The full pull command looks like this:
docker pull mcr.microsoft.com/mssql/server:vNext-CTP2.0-ubuntu
Step 2. Run the Downloaded Container
The next step is to run the container. To do so, the End User License Agreement (EULA) must be agreed upon, a password for the sa user must be set, the port to bind the container to, and a name needs to be assigned to the container as well as the image being run.
Note: Because this is a Windows example, the quotation marks are double quotes instead of single quotes.
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=Pa33word" -p1433:1433 --name sql2019 -d mcr.microsoft.com/mssql/server:vNext-CTP2.0-ubuntu
Verify it’s running by issuing the docker ps command.
Step 3. Connect to SQL Server
Connect to SQL Server using either SQL Server Management Studio or SQL Server Operations Studio. Use the sa account and the password provided in step 2 when running the container.
You’ll notice that even though you are on a Windows machine, SQL Operations Studio displays the OS as Ubuntu. This is because the container running the SQL Server binaries is ubuntu based.
The SQL version appears in the general info screen, but it can also be verified in a query window by executing using select @@version. SQL Server 2019 releases should start with 15.x.x.
Docker hub Public Repository for SQL Server https://hub.docker.com/r/microsoft/mssql-server/
Introducing SQL Server 2019 - https://www.microsoft.com/en-us/sql-server/sql-server-2019#Install