Installing SQL Server Agent on SUSE Linux
In this tip, I will explain how to install SQL Server Agent on SUSE Linux server, so that we can create SQL Server Jobs to schedule repetitive work.
Follow the steps below to install SQL Server Agent on SUSE Linux.
SQL Server Agent Installation on SUSE Linux Server
Before going ahead, you need to have SQL Server vNext running on your SUSE Linux machine where we will install SQL Server Agent. Now let's start the SQL Server Agent installation on SUSE Linux Server.
Step 1: First, connect to the SUSE Linux server either using PuTTY or directly login to the SUSE Linux server using with a valid username and password. I connected directly to this server locally, made a database connection to check the existing version of SQL Server because we need to have CTP 1.4 or later to install SQL Server Agent.
Step 2: As per Microsoft, we need to have SQL Server CTP 1.4 or later to install SQL Server Agent whereas our SQL Server vNext is still running on CTP1.3 in the above image. So first we need to upgrade to CTP 1.4 or later to configure the keys and repositories that we will use when we install the mssql-server-agent package. Let's check the available update for SQL Server by running the zypper command.
#Get SQL Server update info sudo zypper info mssql-server
We can see the available update for SQL Server in the above image which we will be using to upgrade SQL Server.
Step 3: Now we will upgrade SQL Server vNext to bring it to version CTP 1.4. Run the below command to start the process. The user generated databases and system databases will not be affected by this operation, but make sure to keep a backup of everything hosted on your SQL Server to be the safe side.
#Upgrade SQL Server sudo zypper update mssql-server
Once you press enter for above command, execution will start and it will ask you to enter y or n to download the required package. I entered "y" and pressed Enter to proceed with the package download process.
You can see the progress bar for the package download. Installation will start once the package download completes as shown in the below image.
Now we can connect to SQL Server using sqlcmd and check the version of SQL Server. SQL Server has now changed to CTP 1.4 in the below picture. Now our next step is to install SQL Server Agent on this box.
Step 4: First we will run zypper info to check the details of the available package for SQL Server Agent in order to install it on the SUSE Linux server. Run the below command to check the package repositories.
sudo zypper info mssql-server-agent
We can see the details of the available package which we are going to install.
Step 5: The next step is to install SQL Server Agent. Run the below command to kick off the SQL Server Agent installation on this machine.
#Install SQL Server Agent sudo zypper install mssql-server-agent
Once you press enter to execute the above command, execution will start to install the package. It will ask you to enter y to download the package for installation. I have entered y and you can see package download process has started.
Once the package is downloaded, installation will start.
You can see there is an instruction above in the dashed-rectangle box in the above screenshot saying "Please restart mssql-server to enable Microsoft SQL Server Agent". So our next step is to restart this service to complete this installation.
Step 6: Run the below command to restart the SQL Server service and once restarted, check the status of this service to validate the restart step.
#Restart SQL Server service sudo systemctl restart mssql-server #check the status of mssql-server service. sudo systemctl status mssql-server
We can see above the SQL Server service status has been restarted as shown above. The SQL Server Agent installation is complete and you can configure SQL Server jobs on this server.
Step 7: If you want to validate the install, you can connect to the SQL Server instance using SSMS from a Windows machine and expand the SQL Server Agent folder. You will see all of the subfolders and when you right click on "Jobs" or any other folder it will display the options to proceed.
- The next step is to start configuring SQL Server Agent jobs as per your need.
- Explore more knowledge on SQL Server Database Administration tips.
- Check out the SQL Server Agent tips.
- Check out the SQL Server on Linux tips.
Last Updated: 2017-08-02
About the author
View all my tips