How to restart MsSQL server on Linux | Start MsSQL | Stop MsSQL Linux

PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
JAVAEXCEPTIONSCOLLECTIONSSWINGJDBC
EXCEPTIONS
COLLECTIONS
SWING
JDBC
JAVA 8
SPRING
SPRING BOOT
HIBERNATE
PYTHON
PHP
JQUERY
PROGRAMMINGJava ExamplesC Examples
Java Examples
C Examples
C Tutorials
aws
Here we will see how to restart MsSQL server on Linux machine.
MsSQL is a very commonly used database server, at times due to the many reasons you may need to stop/start/restart the server and even look for the status whether it is running or not?
Let’s see how to accomplish these tasks on a Linux machine.
We can get the status of MsSQL server using systemctl command. systemctl command is used to examine and control the state of “systemd” system and service manager.
$systemctl status mssql-server

systemctl status mssql-server
● mssql-server.service - Microsoft SQL Server Database Engine
   Loaded: loaded (/usr/lib/systemd/system/mssql-server.service; enabled; vendor preset: disabled)
   Active: active (running) since Tue 2020-03-31 12:55:05 BST; 1 weeks 0 days ago
     Docs: https://docs.microsoft.com/en-us/sql/linux
 Main PID: 212021 (sqlservr)
   CGroup: /system.slice/mssql-server.service
           ├─212021 /opt/mssql/bin/sqlservr
           └─212043 /opt/mssql/bin/sqlservr
As you can on the above output, the Microsoft SQL Server is running on my Linux machine. Let’s restart the running MsSQL server now.
To stop/start the MsSQL server you need sudo access. Let’s run the below systemctl command with sudo to stop the MsSQL server.
#Stop mssql server
$sudo systemctl stop mssql-server
#Start mssql server
$sudo systemctl Start mssql-server
You won’t see any success messages by running the above commands, that means your server has started successfully, you can confirm the status by using systemctl status mssql-server command as we have seen earlier.
Instead of stop and start, we can even restart the server directly using restart command like below.
# Restart mssql server
$sudo systemctl restart mssql-server

Happy Learning 🙂

Error response from daemon: Cannot kill container: XXX: Container XXX is not running
JQuery Stop Animations Example Tutorial
How to install Maven on Ubuntu 14.x
How to install Apache Kafka on Ubuntu 18.04
How to Install Kubernetes on Ubuntu 18.04
Linux vi commands list
How to set JAVA_HOME on Linux
Spring Boot Redis Cache Example – Redis Server
How to find Linux RHEL version ? OS and Kernel Version ?
How to install Java 11 on Ubuntu 18.04
Install Apache Solr on Windows 10
Ubuntu – How to set default Java version on Ubuntu
MicroServices Spring Boot Eureka Server Example
Setup/Install Redis Server on Windows 10
Spring Boot How to change the Tomcat to Jetty Server

Error response from daemon: Cannot kill container: XXX: Container XXX is not running
JQuery Stop Animations Example Tutorial
How to install Maven on Ubuntu 14.x
How to install Apache Kafka on Ubuntu 18.04
How to Install Kubernetes on Ubuntu 18.04
Linux vi commands list
How to set JAVA_HOME on Linux
Spring Boot Redis Cache Example – Redis Server
How to find Linux RHEL version ? OS and Kernel Version ?
How to install Java 11 on Ubuntu 18.04
Install Apache Solr on Windows 10
Ubuntu – How to set default Java version on Ubuntu
MicroServices Spring Boot Eureka Server Example
Setup/Install Redis Server on Windows 10
Spring Boot How to change the Tomcat to Jetty Server