Open In App

How to install SQL Server Agent on Linux?

Last Updated : 27 Jun, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

SQL Server Agent is a Microsoft Windows service that runs SQL Server jobs, which are scheduled administration activities. SQL Server Agent stores job information in SQL Server. One or more job steps can be found in a job. Each phase has its own set of tasks, such as backing up a database.

Installing SQL Server Agent on Linux

Step 1: Open the terminal for executing the installation commands.

 

Step 2: Update the system by executing the following command.

sudo apt-get update

 

Step 3: Add the SQL Server installation repository to your local environment.

sudo add-apt-repository “$(wget -qO- https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list)”

 

Step 4: Add the security keys using the following statement:

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add –

 

Step 5: Now, it’s time to set up SQL Server. Execute the following command in the terminal to install SQL Server:

sudo apt-get install mssql-server

 

Step 6: Next we will configure the SQL Server. Run the following command to do so:

sudo /opt/mssql/bin/mssql-conf setup

 

Step 7: Now, you will need to enable SQL Server Agent. You can do so by executing the following command:

sudo /opt/mssql/bin/mssql-conf set sqlagent.enabled true

 

You can verify that by viewing the contents of the configuration file, which can be done using the following command:

sudo cat /var/opt/mssql/mssql.conf

 

Step 8: Restart the SQL Server by using the following command:

sudo systemctl restart mssql-server

Now you can use SQL Server Agent!


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads