Enable or Disable SQL Server Service on Linux

In my previous blog, we walked through how to Stop, Start or View SQL Server Service Status on Linux. If you find SQL Server service is disabled or you want to disable or enable it, how would you do it on Linux system? It may sound very basic step, but if you don’t know the command, you may spend plenty of time to figure it out. 

In this guide, we will be discussing the systemctl command to enable or disable the SQL Server service on Linux.

Enable/Disable SQL Server Service on Linux

  • Connect SQL Server on Linux as a root user

Syntax: sudo -i

01connectasrootuser

  • Check the status of SQL Server service on Linux. By default, the SQL Server service will be enabled and running after installation

Syntax: systemctl status mssql-server

01checkthesqlserverservicestatusonlinux

  • Let’s stop and disable the service.

Syntax: systemctl disable mssql-server

02disabledtheservice

  • Now, Let’s enable and start the service.

Syntax: systemctl enable mssql-server

03enabletheservice

Learning is all about improving. Hope, you find it time-saver!

2 thoughts on “Enable or Disable SQL Server Service on Linux

Leave a comment

Your email address will not be published. Required fields are marked *