Installing SQL Server And SQL Operation Studio On Windows And Ubuntu Linux

The article shows how to install SQL Server and SQL Operation Studio on Windows and Ubuntu Linux.

In this article, we are discussing the installation of SQL Operation Studio along with SQL Server on different operating systems. We have two identical machines ready with Windows Server 2012 and Ubuntu Linux 16.04 respectively. We need to install SQL Server 2017 and SQL Operation Studio on both machines. Here, we are going step by step on the installation process.
 

Installation of SQL Server

 
The installation of SQL Server is easy and straightforward on a Windows environment. For this article, I have used SQL Server 2017 Express Edition. It can be downloaded from the official website[1]. Run the package and follow the instructions.
 
Installing SQL Server And SQL Operation Studio On Windows And Ubuntu Linux
 
Follow the wizard with the default setting or choose from the given options. It is easy to install so I am skipping the rest of the steps. In the end, you would see a screen with Connection String where you can see the server name. We would need a Server name to connect SQL Operation Studio. Here, we can see "localhost\SQLEXPRESS" as server name, we can also use machine name instead of localhost like "BenchmarkWin\SQLEXPRESS".
 
Installing SQL Server And SQL Operation Studio On Windows And Ubuntu Linux
 
To install SQL Server on Ubuntu Linux we need to download SQL Server from the official website[2]. Microsoft also provides instruction on the installation of SQL Server on Ubuntu, and we need to execute a couple of commands in the terminal like below.
 
Open Mate Terminal 
  1. Press Ctrl + Alt + T      
  2. sudo apt-get update   
Make sure curl is installed.
  1. sudo apt install curl    
Installing SQL Server And SQL Operation Studio On Windows And Ubuntu Linux
 
Now, execute the below command.
  1. curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -    
  2. curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | sudo tee /etc/apt/sources.list.d/mssql-server.list    
  3. sudo apt-get update    
  4. sudo apt-get install -y mssql-server   
“-y” to automatically return “yes” to all prompts.
 
Installing SQL Server And SQL Operation Studio On Windows And Ubuntu Linux
 
Now, we need to set up the last configuration like accepting license terms, creating a password for SA users, and starting SQL Server.
  1. sudo /opt/mssql/bin/mssql-conf setup    
Installing SQL Server And SQL Operation Studio On Windows And Ubuntu Linux
 
To verify SQL Server is running on the server, use this code.
  1. systemctl status mssql-server   
Installing SQL Server And SQL Operation Studio On Windows And Ubuntu Linux

Installation of SQL Operation Studio

 
To install SQL Operation Studio on Windows, we can download “SQL Operations Studio (preview) installer for Windows” and run and follow the instructions. It is easy and we can take the default setting.
 
Installing SQL Server And SQL Operation Studio On Windows And Ubuntu Linux
 
To install SQL Operation Studio for Ubuntu Linux, download “SQL Operations Studio (preview) for Linux” from the official website, extract files and copy extracted folders to your desired location. Now, run the below commands in the terminal.
  1. echo 'export PATH="$PATH:~/sqlops-linux-x64"' >> ~/.bashrc   
  2. source ~/.bashrc      
  3. sqlops  
The expected response is, SQL Operation Studio should launch. But, I came across errors
Xlib: extension "XInputExtension" missing on display ":10.0". 
 
Installing SQL Server And SQL Operation Studio On Windows And Ubuntu Linux
It is a bug which is already reported for Visual Studio Code; we can apply the same solution in our case too. From the discussion, it seems that the cause of the bug is Ubuntu Mate. I used XRDP to access the machine and XRDP uses Mate Terminal which creates some issue in big-request processing.[3]
 
Installing SQL Server And SQL Operation Studio On Windows And Ubuntu Linux
 
To solve the issue, we can execute the command:
  1. sudo sed -i 's/BIG-REQUESTS/_IG-REQUESTS/' /usr/lib/x86_64-linux-gnu/libxcb.so.1  
Now, let’s try again. Now, we see SQL Operation Studio running on Ubuntu Linux.
 
Installing SQL Server And SQL Operation Studio On Windows And Ubuntu Linux
 
The installation of both SQL Server and SQL Operation Studio on Windows is simple but on Ubuntu Linux, we need to follow some additional steps.