Tips and Tricks to Growing Your SQL Server Estate from SMB to Enterprise Scale
Thursday, June 28, 2018 - click here to learn more
You heard about the release of the multi-platform tool SQL Operations Studio by Microsoft. You want to install it on an Ubuntu system, but you realize that there is no installer like we are used to on Windows systems. In this tip I will show you the steps needed to install SQL Operations Studio on Ubuntu Linux.
When Microsoft released a version of SQL Server with support for Linux systems the entire SQL Server community was shocked. After the initial impact of such notice came the questions. One of the most asked questions was if there will be a release of SQL Server Management Studio for Linux. By now there is no news about if that will happen. Instead Microsoft has released a cross platform GUI tool named SQL Operations Studio that runs on Windows, macOS and Linux. It is an open source software (you can download the source code from the following Git repository: https://github.com/Microsoft/sqlopsstudio) built upon the lightweight multiplatform version of Visual Studio named Visual Studio Code.
SQL Operations Studio has capabilities that make it mostly oriented to developers. Amongst those capabilities we can enumerate:
- Multiple tab windows.
- A T-SQL editor with IntelliSense, keyword completion, code snippets and code navigation.
- Source control integration with Git repositories.
- Output and save results as text, JSON, or even to an Excel file.
- Integrated terminal windows that allow you to set up your favorite command interpreter (cmd, PowerShell, bash, etc.).
SQL Operations Studio Installation Procedures
In order to install SQL Operations Studio first we have to go to the following web page to download the binaries https://docs.microsoft.com/en-us/sql/sql-operations-studio/download?view=sql-server-2017.
As you can see on the previous image, you have three download options for Linux platform. Those options are represented by its file extension as .deb (for Debian package), .rpm (for Red Hat package manager) and .tar.gz (compressed –gzip- tape archive). The first two options are the easiest to install because the installation process is handled by the respective package manager. This way you have the certainty that the SQL Operations Studio package will be installed with all its dependencies. Meanwhile with the *.tar.gz option you must decompress the file into a folder, resolve dependencies (in case your system does not have a required package) by yourself and assign the execution permission to the executable file.
Since this tip refers to installing SQL Operations Studio on Ubuntu, the right file to download is the .deb extension. Remember that Ubuntu derives from Debian distribution.
When the download is complete we can proceed to install SQL Operations Studio; and we can do so either using the graphical interface or the command line. I will explain both methods.
Installing SQL Operations Studio from the Command Line
When we need to install a new software on Ubuntu we automatically think about using apt-get or apt to download and install the application almost without user intervention. But in this case, we are not using a repository to get the software; instead we have a Debian package file. In order to install the package, we will use apt, but you can also use the dpkg tool. Assuming that the package file is named sqlops-linux-0.28.6.deb and is located on your downloads folder (/home/your_user/Downloads), then you can install it by using the following command.
apt install /home/your_user/Downloads/sqlops-linux-0.28.6.deb
The next image is a screen capture that illustrates the installation using the command line.
In case you opt to use the dpkg tool to install SQLOPS then you have to run the following command.
dpkg -i /home/your_user/Downloads/sqlops-linux-0.28.6.deb
Installing SQL Operations Studio from the Command Line Using the Compressed File as Source
Just in case for some reason you need to use the .tar.gz compressed file as the installation source I will briefly enumerate the steps you must follow. But be aware that with this method you won’t have any shortcut unless you create it by yourself.
After downloading the .tar.gz file we must first decompress it with the following command.
tar –zxf sqlops-linux-0.28.6.tar.gz
The next step is to grant execution permission to the executable file /bin/sqlops.
chmod 777 sqlops
On the following screen capture you can see the sequence of commands I executed in order to have SQLOPS installed on the system.
Notice that I have decompressed the SQLOPS files into the Downloads folder. Functionally there is nothing wrong with that, but it would be better to have the application in the parent folder where programs are normally. On Windows we have programs located on the “Program Files” folder, on Linux the typical folder that contains user programs is /usr/bin. In such case, if we want to decompress the files into the /usr/bin folder we must pass the –C parameter to tar followed with the destination folder where we want our files to be uncompressed.
tar –zxf sqlops-linux-0.28.6.tar.gz –C /usr/bin
If SQLOPS doesn’t run properly after uncompressing and setting the respective permissions you may check for missing dependencies. At the time this tip was written those dependencies are libnotify4, libnss3, gnupg, apt, libxkbfile1, libgconf-2-4, libsecret-1-0.
I obtained the previous list of dependencies by executing the following dpkg command on the sqlops-linux-0.28.6.deb file.
dpkg –I sqlops-linux-0.28.6.deb
The following image is a screen capture that shows the execution of the previous command.
Installing SQL Operations Studio Using the Graphic Interface
After downloading the Debian package file, you have to open its destination folder and double click the downloaded file. Then you will see a pop-up window like the one on the following screen capture.
As you can see on the previous image, the Ubuntu Software installer gives you the option to install the software in the .deb file which in this case is SQL Operations Studio; and also, it has a button that re-directs you to the website that contains the respective documentation for this tool.
After pressing the Install button and let the installer to finish, we can browse on our applications menu for the SQL Operations Studio icon to start the program.
- If you need to install SQLOPS on a Windows environment, take a look at this tip: New SQL Operations Studio Installation and Overview.
- Need to use Source Control with your SQL Server code? This tip will give you a solution for sure: SQL Operations Studio - Query Editor and Source Control.
- For a more detailed description about the features of SQL Operations Studio you can check out this tip: SQL Operations Studio Overview and Features.
- I mentioned in this tip that SQL Server Operations Studio is more oriented for development than for administration. On this tip that subject is treated more deeply: SQL Server Operations Studio - Where Does It Fit In?
- For more tips about SQL Server Operations Studio take a look at SQL Server Operations Studio Tips Category.
Last Update: 2018-06-12
About the author
View all my tips