List of jobs associated with database in SQL Server

Spread the love

Introduction

As a DBA I was asked to list out all job in a production SQL Server with respect to the database. Approx 200+ jobes were running and 20+ databases were online. Task seems not so hard, but as I am not so good in query writing. Google was my first and last hope. After a couple of searches, I found two wonderful scripts from a blog. Below both the script will list out jobs associated with the database in a SQL Server.

Script 01

Below query becomes very handy when it is required to list all the jobs residing on a specific database.

Result

Script 02

If it is required to get the complete list of jobs on a server along with the database they reside on, below query helpful.

Result

Source: http://j.gs/DGar


Spread the love
Author: OTi
Meet OTi, the brains behind the popular tech blog "OurTechIdeas.com." OTi is an accomplished author, tech enthusiast, and an expert in SQL Server. With over a decade of experience in the tech industry, he has become a trusted voice in the world of database management. OTi's passion for technology began at a young age, and he has been tinkering with computers ever since. He graduated with a degree in Computer Science and has since worked for some of the biggest tech companies in the world. His experience has given him a deep understanding of how technology works and how it can be used to improve our lives.

Leave a Reply

Your email address will not be published. Required fields are marked *