View SQL Server Agent Job History with Azure Data Studio

This article shows you how to view the history of a SQL Server Agent job in Azure Data Studio.

Install Azure Data Studio

Obviously, you will need to have Azure Data Studio installed on your computer. If you don’t already have Azure Data Studio, here’s how to install it on a Mac, Red Hat, and Ubuntu 18.04 and Ubuntu 20.04.

As for Windows, Azure Data Studio is now included when you download and install SSMS. See How to install SSMS.

Install the SQL Server Agent Extension

The key to being able to view job history in Azure Data Studio is the SQL Server Agent extension.

This extension enables you to do stuff like create SQL Server Agent jobs, view jobs, view job history, stop/start jobs, etc. Viewing job history is exactly what we’re trying to do here, so let’s go ahead and install the extension.

To install the extension, open the Extensions pane:

Screenshot of Azure Data Studio with an arrow pointing at the Extensions icon

Now enter sql server agent (or even just agent) into the search box at the top. This should filter the extensions to just the SQL Server Agent, like this:

Screenshot of the Extensions pane with just the SQL Server Agent extension listed.

Click Install to install the extension.

Get Job History

Now that the SQL Server Agent extension has been installed, we can go ahead and get the history of SQL Server Agent jobs.

As mentioned, you can use the extension from the Manage tab of a server.

When you have the servers showing in the left pane, right-click on a server’s name to bring up the contextual menu:

Screenshot of the contextual menu with the Mange option highlighted.

From the menu, click Manage.

That opens the management Home screen for the server:

Screenshot of the management Home screen for the server

From there, we can see the SQL Agent option.

Click SQL Agent.

This opens the SQL Server Agent screen, where you can manage the SQL Server Agent jobs on the server:

Screenshot of the SQL Server Agent management screen

You can click on any job in this list to view its history.

Here’s an example of what it looks like when I click on one of the above jobs:

Screenshot of the job history for a SQL Server Agent job

You can click on each item in the left history pane to display that item’s details in the right pane.

As of this writing, there doesn’t appear to be a way to pull up the history of all jobs at once using this extension. You need to go into each job individually to view its history.

That said, the development team are continuing to add functionality to this extension, so perhaps that’s something we might see in the future? Or by the time you’re reading this, perhaps it’s already implemented?

In any case, there are also T-SQL options that allow you to view the history of all jobs, such as the sp_help_jobhistory stored procedure, and the sysjobhistory table in the msdb database.