mamidimahesh-127681
SSC Eights!
Points: 868
More actions
July 14, 2006 at 3:48 am
#173376
Hi All,
I need to know my procedure is called by which SQL Job or SQL Procedure. Please help me.
Thanks in advance,
Mahesh
SQLZ
SSChampion
Points: 12872
July 14, 2006 at 4:44 am
#649195
Mahesh, try this:
declare @proc_name sysname
set @proc_name = 'enter proc name in here'
select j.name as job_name
from msdb..sysjobs j
join msdb..sysjobsteps s on s.job_id = j.job_id
where command like '%' + @proc_name + '%'
hope that helps,
Karl
Karlsource control for SQL Server
July 17, 2006 at 12:31 am
#649457
Thanks Karl, it helped me
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply