Installing SQL Server on Linux was a great experience for me, that I would like to share with you the challenges and some of the scripts. Hope you enjoy reading this blog post and it is informative for you.
Before we start, we do need to install the Ubuntu Server 16.04 version on either physical machine or virtual. I used Hyper-V to host the Linux OS but I found that VirtualBox works much better and smooth with Linux OS. So I suggest you to use VirtualBox to install SQL Server on Ubuntu.
Step 1: Enter
sudo command to change the current user to
SuperUser and install the Microsoft GPG Keys into the Ubuntu by the following script:
Step 2: Register SQL Server repository into the Ubuntu by the following script.
Step 3: Now its time to install SQL Server by using the following script. In some cases the following script does not run and throws an error regarding another process is using the path or variable, which you need to restart the Ubuntu.
As you see in the above output, it mentions that repository cannot be authenticated. You may ignore this error message.
Now, the SQL Server installation is done!
Step 4: Run the following script to configure the SQL Server instance in Ubuntu.
Step 1: Register the Microsoft SQL Server repository in Ubuntu by the following script.
Step 2: Run the following script to install the Microsoft SQL Server Tools in Ubuntu.
Step 3: Once the packages are downloaded and installed, you are required to accept the license terms and conditions through the following prompt message boxes.
MSSQL-SERVER Service Verification
Now its time to verify, whether the SQL Server instance is running properly on Ubuntu or not, You may use the following script to verify the service.
Connecting to SQL Server
We are only able to connect to SQL Server instance in Ubuntu through SQLCMD tool, and you can able to connect to the database engine through SQL Server Management Studio on Windows platform.