SQL Server: Job – How to find jobs calling a specific stored proc?

[sql]SELECT j.name
FROM msdb.dbo.sysjobs AS j
WHERE EXISTS
(
SELECT 1 FROM msdb.dbo.sysjobsteps AS s
WHERE s.job_id = j.job_id
AND s.command LIKE ‘%store_proc_name%’
);
[/sql]

Be the first to comment

Leave a Reply

Your email address will not be published.


*