Listing SQL Agent jobs on a SQL Server instance is occasioanlly needed for DBAs or ETL Experts to help monitor scheduled jobs that may be critical for a business process or report.
In this post, I share SQL scripts that list all SQL Server Agent Jobs on a Microsoft SQL Server Instance.
SQL Script to get all Server Agent Jobs
Copy/paste and run this SQL script to list the SQL Agent Jobs in SQL Server:
We are querying the sysjobs and sysjobsteps system tables which are in the M-S-D-B database. Interesting fact, you are unable to publish a post in WordPress with this actual database name without seeing a JSON error. Type m-s-d-b without the hyphens and attempt to save a post . This is a common issue I get, and to share SQL scripts I often have to make it into a GitHub Gist.
If you are looking for a script that also returns SQL Agent job steps, see this Gist.
Hope this script was what you were looking for! Check out my SQL Server Scripts tag for more useful SQL Scripts for DBAs.