How to Install SQL Server Agent on Ubuntu Server without Internet – Offline Installation

SQL Server Agent runs scheduled SQL Server jobs and is very useful to automate database tasks. Here i will show you how to install SQL Server Agent on Ubuntu Linux server. We will use offline method to install SQL Server Agent because our Ubuntu server is running without an internet connection. Installing SQL Server Agent on Ubuntu server that has internet connection is quite easy method. Have a look at the attached article to understand the steps.

Before going ahead, we need a SQL Server Instance running on Ubuntu Linux Server. If you have no idea about installing Ubuntu server or SQL Server 2017 or creating a virtual machine where you can install Ubuntu/RHEL and SQL Server then i would recommend you to read below articles.

Offline Installation of SQL Server Agent on Ubuntu

It is time consuming to install anything if your Ubuntu server has no access of internet. We generally call such installations as offline installation. Microsoft suggests below steps for offline installation of SQL Server Agent on Ubuntu server.

  • Download SQL Server Agent packages.
  • Move this downloaded package to your Ubuntu Linux Machine.
  • Install the copied debian package on the server.
  • Resolve Missing Dependencies, if you get any.

Now we will go step by step process with the screenshots that will help readers to understand whole process.

SQL Server Agent Offline Installation – Step by Step

Before moving ahead let’s check whether SQL Server Agent is installed or not on this machine. You can connect to SQL Server instance using SSMS on your local host. You can see we are able to see SQL Server Agent folder but it is grayed out and not accessible. We need to install SQL Server Agent on Ubuntu server to enable it.

Check SQL Server Agent in SSMS

You can check and verify SQL Server service by executing below command.

#Check SQL Server Service.
systemctl status mssql-server

Check SQL Server Service

You should proceed if SQL Server service is running fine. Next step is to start the package download and proceed with installation. Below is the image of SQL Server Agent Package which we will download to install SQL Server Agent.

Download SQL Server Agent Package

Download the highlighted debian package for SQL Server Agent. You can download this package on machine or PC which is connected to the internet. Once package will be downloaded to your local PC, next step is to copy this packages to the Ubuntu Linux server that are running without internet connection. I used WinSCP tool to copy this file from machine where i have downloaded it to the Linux server. Make sure that there should be connectivity between both machine.

Connect to WinSCP

If you have not installed WinSCP, download it and install on your PC. Launch WinSCP tool and make a connection to Ubuntu server. There are two panes in WinSCp window. The files shows in left side pane is your local system and right side pane is your target Ubuntu server. Now we just need to drag the downloaded debian package from left side pane and drop it to right side pane to copy it to Ubuntu server. Agent file is copied now and we can see that files in both side panes.

Copy Agent Package

Now we can connect to Ubuntu server and validate whether this file is copied there or not. Connect to Ubuntu server and check the files. We can see downloaded file is very much there on Ubuntu server. Now next step is to install this package. We will use the dpkg package to install it as we do for other applications on Ubuntu. Let’s install it by running below command.

#Install SQL Server Agent on Ubuntu
sudo dpkg -i mssql-server-agent_14.0.900.75-1_amd64.deb

Install SQL Server Agent on Ubuntu

This installation has suggested us to restart SQL Server service to complete this installation so go ahead and restart the service by executing below command.

#Restart SQL Server Service.
systemctl restart mssql-server

restart SQL Server Service

Now SQL Server Agent is installed on this server. Go ahead connect to this SQL Server Instance using SSMS from local host. This time you would be able to see SQL Server Agent folder enabled.

Check SQL Server Agent post Installation

You can see SQL Server Agent is showing there. Now you can create any jobs on SQL Server to automate database activities.

Read more about SQL Server on RedHat Linux:

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

Follow me:

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.
Manvendra Deo Singh
Follow me:

You may also like...

Leave a Reply

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