June 25, 2008 at 3:58 pm
Morning Ladies and Gents,
I've recently started working with SQL Server 2005 and in an attempt to cut down my manual checking each morning, I've enabled mail notification for my maintenance plans and a few other specific jobs, however I was just wondering if there is any way in which I can create mail notifications if jobs are still executing, difficult I understand because jobs are running throughout the night etc, so I have no idea if its possible. Occasionally jobs have continued running when they should have finished, obviously raised the problem with the people responsible, but is there a way to be notified if jobs are still executing?
If its an obvious answer, please be gentle, I'm still a newbie 🙂
Thanks in advance.
June 25, 2008 at 4:44 pm
you need to setup a database mail profile first,
then setup operator,
then enable database mail in the agent configuration.
then select operator in agent job.
restart agent.
June 25, 2008 at 4:53 pm
Thank you, I've actually already set up mail notification and its working without problem, I was querying if I can get a mail informing me of active jobs.
June 25, 2008 at 8:40 pm
Interesting query.
you can have a step in the job that can send you emails when to job started and ofcourse the notification can be set to send you email on completion/failure.
Wrap a Code around the sp_helpjob(Create a #table and insert sp_help_job into the Table) and keep on checking the value for current_execution_status every 30 secs or a minute,which in turn send you a email about the status.
This is what i can think of right now...
Maninder
www.dbanation.com
June 26, 2008 at 5:09 am
Create another job that executes msdb..sp_help_job and emails you the results.
The execution status of the jobs indicates if they are running.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply