Install SQL Server Agent on Ubuntu Server

I have shown how to install SQL Server 2017 on Ubuntu server that have internet access in my last article. If your Ubuntu server doesn’t have internet access then you should read attached article to install SQL Server in offline mode. Here I will show you how to install SQL Server Agent on Ubuntu server that are connected to internet.

Install SQL Server Agent on Ubuntu Linux

Let’s first check whether SQL Server Agent is installed or not on your existing server.  Before installing SQL Server Agent, you must install SQL Server 2017  on your ubuntu server. If you have already installed SQL Server 2017 then you can connect to SQL Server that you have installed on Ubuntu server in SSMS.

Related Articles:

As we can see, SQL Server Agent or SQL Agent is disabled and none of its options are showing as enabled in below image. This is because SQL Server Agent package is not installed on that Ubuntu server.


SQL Agent Package comes with SQL Server 2017 package repository so if you have downloaded SQL Server 2017 repository, you can just run installation command to install SQL Server Agent. You can have a look at my last article where I have installed SQL Server 2017 to understand how to download Microsoft Ubuntu repositories. As we have already installed SQL Server 2017 by downloading its repositories so we can directly install SQL Server Agent here. Run below command to install SQL Server Agent package.

#Install SQL Server Agent
sudo apt-get install mssql-server-agent

You can see SQL Server Agent is installed on this machine in above screenshot and also this installation is suggesting us to restart the SQL Server service to enable SQL Server Agent. Now run below command to restart SQL Server service on this machine. You can see we have restarted SQL Server service in below image.

#Restart SQL Server Service
systemctl restart mssql-server

#Check SQL Server Service Status
systemctl status mssql-server

Now connect to SQL Server Instance in SSMS client. You can also connect to SQL Server using sqlcmd utility but we need to separately install this utility to make database connection that we will do in another article. If you are already connected to SQL Server instance in SSMS then just right click on Agent folder and click on refresh button.

You can see SQL Server Agent folder is enabled and all options are showing now in below image. Even now we can create any agent job to schedule any database tasks now.

I hope you like this article. Please follow us on our facebook page and on Twitter handle to get latest updates.

Follow me:
Summary
Article Name
Install SQL Server Agent on Ubuntu Server
Description
I have shown how to install SQL Server 2017 on Ubuntu server that have internet access in my last article. Here I will show you how to install SQL Server Agent on Ubuntu server that are connected to internet.
Author
Publisher Name
https://techyaz.com
Manvendra Deo Singh: I am working as a Technical Architect in one of the top IT consulting firm. I have expertise on all versions of SQL Server since SQL Server 2000. I have lead multiple SQL Server projects like consolidation, upgrades, migrations, HA & DR. I love to share my knowledge. You can contact me on my social accounts for any consulting work.
Related Post
Leave a Comment