Upgrading your SQL Server Version on Linux is as easy as 1,2,3

With SQL Server 2019 now released, I wanted to try upgrading on Linux as soon as I had a little free time. I was honestly surprised at how simple this really was; and how quick it was.

There is documentation on all the supported OSes, but I wanted to very quickly show just how quick it was, as it really is 3 very simple steps:

  1. Remove the existing repository. I was using the CU version:
    sudo add-apt-repository -r 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/mssql-server-2017 xenial main'
  2. Add the new repository:
    sudo curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
    sudo add-apt-repository "$(curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2019.list)"

    A real shame that SQL Server is still only "officially" supported on 16.04, but I have a 2019 preview instance that has been running on 18.04 without problems.

  3. Update the package lists and upgrade:
    sudo apt update && sudo apt dist-upgrade

That's it, you have now successfully upgraded your SQL Server 2017 on Linux Instance to SQL Server 2019 on Linux. When I tested this, I did need to first log in as the sa login, which then allows any other logins to authenticate.

For me, on my PC and home internet, this took but a few minutes, and almost all of that time was downloading the 230MB update files on my awful 10Mbps line. Installation was probably less than 10 seconds once all the files had been downloaded.

So, if you're using SQL Server 2017 on Linux, and it's an Express/Developer edition, then you might was well try the new version. They are both free, under the licensing terms they provide, and And is a very quick task.


One thing I should have mentioned (and it completely slipped my mind) is that this will only update the Data Engine and your System Databases. Any User Databases you have on your instance will still be in Compatibility Mode 140, not 150. For the databases you want to update you'll need to change that with an ALTER statement:


Leave a Reply

Your email address will not be published. Required fields are marked *