Get List of SQL Server Agent Job Names, Category Names

Need to get a quick list of all SQL Agent jobs, with their respective categories?  Join the sysjobs table to the syscategories table:

SELECT j.[job_id], j.[name] [job_name], j.[category_id], c.name [category_name]
FROM [msdb].[dbo].[sysjobs] j
JOIN [msdb].[dbo].[syscategories] c
ON j.category_id = c.category_id
ORDER BY 2

About these ads

Posted on May 4, 2012, in SQL Server. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: