Cron jobs

How to find jobs calling a certain stored procedure?

  • SQL Server

    [sql]
    DECLARE @Search varchar(255)
    SET @Search=’keyword’

    SELECT j.name as job_name, s.step_id, s.step_name FROM msdb.dbo.sysjobsteps AS s, msdb.dbo.sysjobs as j
    WHERE s.job_id = j.job_id AND s.command LIKE ‘%’+@Search+’%'[/sql]

Be the first to comment

Leave a Reply

Your email address will not be published.


*