| title | description | author | ms.author | manager | ms.date | ms.topic | ms.prod | ms.custom | ms.technology | ms.assetid |
|---|---|---|---|---|---|---|---|---|---|---|
Install SQL Server Agent on Linux | Microsoft Docs |
This article describes how to install the SQL Server Agent on Linux. |
rothja |
jroth |
craigg |
02/20/2018 |
conceptual |
sql |
sql-linux |
linux |
77f16adc-e6cb-4a57-82f3-7b9780369868 |
[!INCLUDEappliesto-ss-xxxx-xxxx-xxx-md-linuxonly]
The SQL Server Agent runs scheduled SQL Server jobs. Starting with SQL Server 2017 CU4, SQL Server Agent is included with the mssql-server package and is disabled by default. For information on the features supported for this release of the SQL Server Agent along with version information, see the Release Notes.
Install/Enable the SQL Server Agent:
- For Versions 2017 CU4 and above, Enable the SQL Server Agent
- For Versions 2017 CU3 and Below, Install the SQL Server Agent
To enable SQL Server Agent, follow the steps below.
sudo /opt/mssql/bin/mssql-conf set sqlagent.enabled true
sudo systemctl restart mssql-serverNote
If you are upgrading from 2017 CU3 or below with Agent installed, SQL Server Agent will be enabled automatically and previous Agent packages will be uninstalled.
Note
The install instructions below apply to SQL Server Versions 2017 CU3 and below. Before installing SQL Server Agent, first install SQL Server. This configures the keys and repositories that you use when you install the mssql-server-agent package.
Install the SQL Server Agent for your platform:
Use the following steps to install the mssql-server-agent on Red Hat Enterprise Linux.
sudo yum install mssql-server-agent
sudo systemctl restart mssql-serverIf you already have mssql-server-agent installed, you can update to the latest version with the following commands:
sudo yum check-update
sudo yum update mssql-server-agent
sudo systemctl restart mssql-serverIf you need an offline installation, locate the SQL Server Agent package download in the Release notes. Then use the same offline installation steps described in the article Install SQL Server.
Use the following steps to install the mssql-server-agent on Ubuntu.
sudo apt-get update
sudo apt-get install mssql-server-agent
sudo systemctl restart mssql-serverIf you already have mssql-server-agent installed, you can update to the latest version with the following commands:
sudo apt-get update
sudo apt-get install mssql-server-agent
sudo systemctl restart mssql-serverIf you need an offline installation, locate the SQL Server Agent package download in the Release notes. Then use the same offline installation steps described in the article Install SQL Server.
Use the following steps to install the mssql-server-agent on SUSE Linux Enterprise Server.
Install mssql-server-agent
sudo zypper install mssql-server-agent
sudo systemctl restart mssql-serverIf you already have mssql-server-agent installed, you can update to the latest version with the following commands:
sudo zypper refresh
sudo zypper update mssql-server-agent
sudo systemctl restart mssql-serverIf you need an offline installation, locate the SQL Server Agent package download in the Release notes. Then use the same offline installation steps described in the article Install SQL Server.
For more information on how to use SQL Server Agent to create, schedule, and run jobs, see Run a SQL Server Agent job on Linux.