Learn more about SQL Server tools

mssqltips logo
 

Tutorials          DBA          Dev          BI          Career          Categories          Webcasts          Whitepapers          Today's Tip          Join

Tutorials      DBA      Dev      BI      Categories      Webcasts

DBA    Dev    BI    Categories

 

Installing SQL Server Agent on SUSE Linux


By:   |   Read Comments   |   Related Tips: More > SQL Server on Linux

Attend these FREE MSSQLTips webcasts >> click to register


Problem

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.

Solution

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.

connect to SUSE Linux Server

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

SQL Server update on SUSE

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

upgrade sql server vNext

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.

upgrade sql server vNext

You can see the progress bar for the package download. Installation will start once the package download completes as shown in the below image.

upgrade sql server vNext

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.

Check sql server vNext version

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

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

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.

zypper install mssql-server-agent

Once the package is downloaded, installation will start.

zypper install mssql-server-agent

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

restart sql server service

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.

Next Steps


Last Update:


signup button

next tip button



About the author
MSSQLTips author Manvendra Singh Manvendra Singh has over 5 years of experience with SQL Server and has focused on Database Mirroring, Replication, Log Shipping, etc.

View all my tips
Related Resources





Post a comment or let the author know this tip helped.

All comments are reviewed, so stay on subject or we may delete your comment. Note: your email address is not published. Required fields are marked with an asterisk (*).

*Name    *Email    Notify for updates 


SQL tips:

*Enter Code refresh code     



Learn more about SQL Server tools