How to find all SQL Agent Jobs that call a given stored-proc
I'm in SQL 2008/R2. I want to run a query to see if there is a SQL Agent job calling a specified stored proc (there are too many to inspect manually). Here is a query that will give you that and more (look at the WHERE clause for the stored proc name): SELECT [sJOB].[job_id] AS [JobID] , [sJOB].[name] AS [JobName] , [sJSTP].[step_uid] AS [StepID] , [sJSTP].[step_id] AS [StepNo] , [sJSTP].[step_name] AS [StepName] , CASE [sJSTP].[subsystem] WHEN 'ActiveScripting' THEN 'ActiveX Script' WHEN 'CmdExec' THEN 'Operating system (CmdExec)' WHEN 'PowerShell' THEN 'PowerShell' WHEN 'Distribution' THEN