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.
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.
Quickly connecting my Ubuntu base machine with terminal (most of cases Putty) places a role here.
Screenshot contains Ubuntu Version i.e. 16.04 (I’ve yet to upgrade OS to 16.10, latest).
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.
Type EXIT to move out of SQLCMD prompt.
Here I’m going check the latest updates available for Ubuntu OS and have them downloaded.
sudo apt-get update
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.
apt-cache policy mssql-server
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.
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.
apt-get install mssql-server
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.
Cool, all files are download and upgraded my SQL Server vNext, seamlessly.
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.
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.
Regional Head – DataPlatformGeeks & DPS2017 Core Team Member
Like us on FaceBook | Join the fastest growing SQL Server group on FaceBook