Find text in Stored Procedures & then find JOB associate with Stored Procedure in SQL Server


Few days before I was asked to disable some ‘JOB’ in a production SQL Server. But the task was a little tricky!! I was given a subject line and asked to stop that particular daily auto report email. Server IP & Database name was only provided. Now the challenge was to find that stored procedure where that SUBJECT LINE was used & the JOB by which that particular stored procedure is executing.

Script to find TEXT in the Stored Procedure

First, we google & found two suitable SQL script to find TEXT in the stored procedure within a database.

Script to find JOB associate with Stored Procedure

So we found the stored procedure name finally. Now we need to find the associated JOB, by which the stored procedure execution took place & disable that JOB.

Below script can be used to find ‘Job’ by providing stored procedure name


Facebook Comments Box


Leave a Reply

Your email address will not be published.