DECLARE @proc AS VARCHAR(50) SET @proc = 'usp_find_record' --specify stored procedure name here SELECT job.name ,job.description ,step.job_id AS 'JobID' ,step.command AS 'Source' FROM msdb.dbo.sysjobs job INNER JOIN msdb.dbo.sysjobsteps step ON step.job_id = job.job_id WHERE step.command LIKE '%' + @proc + '%'
Labels
- Differences (38)
- MongoDB (13)
- MySQL (10)
- Oracle (6)
- ORACLE DBA (1)
- Performance Tuning (13)
- PTuning (3)
- Scenarios (4)
- Scripts (35)
- SQLDBA (99)
- SQLDeveloper (66)
- SSIS (5)
- SSRS (8)
- Troubleshooting (37)
Friday, 7 February 2020
Find SQL Agent job name which is using specific stored procedure inside
Subscribe to:
Posts (Atom)