Thursday, July 5, 2012

Finding Job and owner details of Scheduled jobs in MSDB database



select sj.name,sj.description,suser_sname(sj.owner_sid) 'Job Owner',sj.enabled,sj.date_created,sj.date_modified,
sjs.next_run_date,sjs.next_run_time from msdb..sysjobs sj join
msdb..sysjobschedules sjs on sj.job_id=sjs.job_id
order by sj.name
..

Above query will return the job name, owner name, and some important information needed for the user..

Hope it gets useful..

No comments:

Post a Comment