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
- Check the status of SQL Server service on Linux. By default, the SQL Server service will be enabled and running
Syntax: systemctl status mssql-server
- Let’s stop and disable the service.
Syntax: systemctl disable mssql-server
- Now, Let’s enable and start the service.
Syntax: systemctl enable mssql-server
Learning is all about improving. Hope, you find it time-saver!
2 thoughts on “Enable or Disable SQL Server Service on Linux”
Hi Dharmendra ,
How to check whether SQL server agent is running or not in server .
Hi Pavan, The SQL Server agent is not support on CTP1. You can refer the link for more details – https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-release-notes