Search This Blog & Web

Showing posts with label Finding sql server procedure.. Show all posts
Showing posts with label Finding sql server procedure.. Show all posts

Wednesday, February 6, 2013

How can you find the stored procedure used by SQL Job


Using following query we can find procedure used in SQL Job.

use msdb
go
 
 

select sj.name as job_name, st.command

from sysjobs sj join sysjobsteps st

on sj.job_id = st.job_id

where st.command like '%Procedurename%'