Upgrading SQL Server vNext on Ubuntu 16.04 (LTS)

Upgrade/Patching are vital for enterprises & routine activity for DBA. Since SQL Server vNext lunched (for Linux Kernel based OS), DBA responsibility extends to it.

Microsoft released an update for SQL Server on Ubuntu from CTP 1.3 to CTP1.4 with decent amount of new features. Definitely there is need to have them into my environment and start leveraging new features. But before that if you want to see how to install, configure & use SQL Server vNext on Linux (Ubuntu) feel free to go through my detailed blog.

Let’s quickly move ahead and walk through on consolidated 7 steps showing how my updated from CTP 1.3 to CTP 1.4 looks like.

Step 1

Standard – Take a complete backup of all users & system databases for any later recovery in an event of unsuccessful upgrade.  For now I’m skipping with an assuming neither myself not you are using CTP version for any production environment.

Step 2

Quickly connecting my Ubuntu base machine with terminal (most of cases Putty) places a role here.

0 - Connect OS

Screenshot contains Ubuntu Version i.e. 16.04 (I’ve yet to upgrade OS to 16.10, latest).

Step 3

Before moving to connecting online repositories and start downloading upgrade files, let’s connect to existing SQL Server vNext hosted on Ubuntu and check existing version. SQLCMD tool is my tool in this case. SSMS always remains a favorite option.

1 - Connect SQL vNext

Type EXIT to move out of SQLCMD prompt.

Step 4

Here I’m going check the latest updates available for Ubuntu OS and have them downloaded.

2 - Update OSInstallation can be done later with the help of Install command, will talk about in following steps.

Step 5

Now I’m checking available updates ready for SQL Server vNext. That’s a standard practice, following for years because it’s important to know what’s existing and what’s going to be future. Better visibility and understanding about product which is revolving throughout its life. I prefer to read features in new upgrade and share with development team/application stake holders as FYI.

3 - Present & Future SQL Updates

Picture talks about two things:

  • What’s currently Installed
  • What’s going to update.

Unfortunately it’s hard to say from which CTP version to which upgrade will take place, however if you know the exact version number, eases out pain.

Step 6

Cool, quite a few things are clear, I’m good to go ahead and update my SQL Server vNext CTP 1.3 (14.0.304.138-1).

Note: Always run upgrade commands in super user mode i.e. SUDO.

Run below command to have SQL Server vNext upgraded.

5 - SQL Update (A)

It shows 1 upgrade is available for SQL Server and requires 147MB of space. Let’s give sometime to download files and perform upgrade.

My slow internet connection (grrrr) took around 4 minutes to download repositories and upgrade my SQL Server vNext to CTP 1.4.

5 - SQL Update (B)

Cool, all files are download and upgraded my SQL Server vNext, seamlessly.

Step 7

I have a bad practice of checking SQL Server version upgrade with  tools by connecting SQL instance and do some activity.

SQLCMD again a handy one.

6 - Connect updated SQL instance A

Hurry! SQL Server vNext is upgraded to CTP 1. 4 (14.0.405.198). I found it pretty ease and straight forward, hoping same for you.

Happy Learning!

Avanish Panchal
Regional Head – DataPlatformGeeks & DPS2017 Core Team Member
Like us on FaceBook | Join the fastest growing SQL Server group on FaceBook

Follow Avanish Panchal on Twitter | Follow Avanish Panchal on FaceBook