IF EXISTS(SELECT 1 FROM msdb.dbo.sysjobs J JOIN msdb.dbo.sysjobactivity A ON A.job_id=J.job_id WHERE J.name=N'delete resume_x_job_position' AND A.run_requested_date IS NOT NULL AND A.stop_execution_date IS NULL)
select 'The job is running!'
ELSE
select 'The job is not running.'
select 'The job is running!'
ELSE
select 'The job is not running.'
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29898569/viewspace-1847999/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29898569/viewspace-1847999/