Skip to main content

Installing MS SQL Server on Ubuntu 16.04

This post about installing the MS SQL Server on Ubuntu 16.04. MS SQL Server could be installed only on Windows, Now Microsoft released SQL Server 2017, which adds Linux support for these Linux platforms: Red Hat Enterprise Linux, SUSE Linux Enterprise Server, Ubuntu & Docker Engine. Find the steps below for installing MS SQL Server on Ubuntu 16.04


1. Login to sudo user
$sudo su
2.Install CURL (if curl is not already installed)
$sudo apt-get install curl
3.Register MS SQL Server repository
$curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add
$curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list > /etc/apt/sources.list.d/mssql-server.list
$curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/msprod.list
sudo apt-get update
Note: mssql-server.list contains mssql-server and msprod.list contains mssql-tools
4. Install MS SQL server.
$sudo apt-get install -y mssql-server
$sudo /opt/mssql/bin/sqlservr-setup
Note: Do remember the password you have entered while installing the MS SQL server. Default username for the server is SA
5.Check the MS SQL Server service is running or not
$systemctl status mssql-server
6. Install MS SQL Tools
$sudo apt-get install mssql-tools
7. Connect the MS SQL Server via terminal using "sqlcmd" command and test some sample queries Syntax:
sqlcmd -S <hostname> -U <username> -P <password>
Example:
$sqlcmd -S localhost -U SA -P password
>CREATE DATABASE school;
>USE school
>CREATE DATABASE student(rollnumber INT, name VARCHAR(50));
>INSERT INTO student VALUES(1,'HARISH');
>SELECT * FROM school.student;
>QUIT

Comments

Post a Comment

Popular posts from this blog

Install Hadoop 2.5.1 on Windows 7 - 64Bit Operating System

This post is about installing Single Node Cluster Hadoop 2.5.1 (latest stable version) on Windows 7 Operating Systems.Hadoop was primarily designed for Linux platform. Hadoop supports for windows from its version 2.2, but we need prepare our platform binaries. Hadoop official website recommend Windows developers to use this build for development environment and not on production, since it is not completely tested success on Windows platform. This post describes the procedure for generating the Hadoop build for Windows platform. Generating Hadoop Build For Windows Platform Step 1:Install Microsoft Windows SDK 7.1 In my case, I have used Windows 7 64 bit Operating System. Download Microsoft Windows SDK 7.1 from Microsoft Official website and install it. While installing Windows SDK,I have faced problem like C++ 2010 Redistribution is already installed. This problem will happen only if we have installed C++ 2010 Redistribution of higher version compared to the Windows SDK. ...

Install Spring Tool Suite on Ubuntu

This post is about installing Spring Tool Suite (STS) on Ubuntu. The Spring Tool Suite is an Eclipse-based development environment that is customized for developing Spring applications. Step 1: Download the latest Spring Tool Suite for Linux from STS official website: http://spring.io/tools/sts/all  Step 2: Extract into any folder which you prefer. My extracted Spring Tool Suite locations is /home/harishshan/springsource Step 3: Create the Menu icon for quick access sudo nano /usr/share/applications/STS.desktop Step 4: Enter the following content [Desktop Entry] Name=SpringSource Tool Suite Comment=SpringSource Tool Suite Exec=/home/harishshan/springsource/sts-3.4.0-RELEASE/STS Icon=/home/harishshan/springsource/sts-3.4.0-RELEASE/icon.xpm StartupNotify=true Terminal=false Type=Application Categories=Development;IDE;Java; Step 5: Now you can check from Quick Menu by typing " Spring "

How to fix Kindle wrong time left in chapter book

The most of kindle reader use the time left in chapter or time left in book options provided at left bottom of the page to estimate completing the book or the current chapter. But sometimes it was not  accurate and displaying 5 min left in chapter instead of 30 min left in chapter. To fix this issue just type ;ReadingTimeReset at search field and enter. Kindly refer the photo for the same.