SQL Server Agent is very useful in automating any database activities. By default, it is not installed along with SQL Server on Linux server. You need to manually install it after installing SQL Server. Here I will explain step by step process to install SQL Server Agent on RedHat Linux 7.3 server running with internet access.
Before going ahead, we need to have a RedHat Linux server. If you have no idea about installing Linux server or creating a virtual machine where you can install Linux and SQL Server then i would recommend you to read below articles first.
- How to Create a Virtual Machine.
- Install RedHat Linux 7.3 on a virtual machine.
- How to Install SQL Server on RedHat Linux 7.3
If you have installed SQL Server on Red Hat Linux server, your next step should be to install SQL Server Agent on that server. Make sure you have internet access on the Linux server where we are going to install SQL Server Agent. If your server does not have internet connection then you should read attached article about installing SQL Server Agent on RedHat Linux that are running without Internet.
Install SQL Server Agent on RHEL
As this Linux machine has internet connection so let’s go ahead with Installation on Red Hat Linux server. Installation process is quite similar to the installation of SQL Server on Redhat Linux.
You don’t need to download SQL Server Agent package separately the way we did for SQL Server and SQL Tools installations.The package required to install SQL Server Agent included into SQL Server package repository configuration file.
If you have already downloaded SQL Server package repository configuration file to install SQL Server, you can skip this step and go ahead to install Agent on your server. If you don’t have SQL Server package repository configuration file or you have deleted it then you can run below command to download the package repository configuration file.
#Download Microsoft SQL Server Red Hat repository configuration file sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server.repo
This will download Microsoft SQL Server Package Repository Configuration File that are required to install SQL Server and SQL Server Agent.
As we have the Agent repository configuration file now, Let us first check the SQL Server in SSMS to see how SQL Server Agent working. You can see we are not able to do anything in SQL Server Agent folder.
Now our next step is to install SQL Server Agent to enable its related features. Run below command to start the installation.
#Install SQL Server Agent
sudo yum install mssql-server-agent
You cans see series of executions started to proceed with the installation in below image. It will also ask you to enter Y to proceed.
Enter Y to proceed with the installation, once you press enter it will proceed to install. Now SQL Server Agent will install on your machine.
It will also suggest you to restart SQL Server service. If you will not restart SQL Server service, installation will not be completed so next step is to restart SQL Server service on this server.
#Restart SQL Server Service
systemctl restart mssql-server
You can see SQL Server is online now. Go ahead and connect to SQL Server in SSMS as per below image.
Now you can create Agent jobs to automate database activities on your SQL Server instance.
I hope you like this article. Please follow us on our facebook page and on Twitter handle to get latest updates.
- How to Fix SQL Error 1005: A Comprehensive Guide - April 9, 2023
- How to Fix SQL Server Error 207 – Invalid Column Name - April 9, 2023
- How to Fix SQL Error 1045: Resolving Access Denied Issues - April 8, 2023
Leave a Comment