June 10, 2011 at 3:57 pm
Hi,
I've got roughly 60 agent jobs that have a step in them to send an email to a list of email addresses, and now they all need to be updated to remove one of the individuals email addresses. Is it possible to update all the jobs via script? or do I have to open each job and perform the update manually?
TIA
June 10, 2011 at 4:12 pm
You can either browse sysjobsteps and perform an update against that, or script out all your jobs and do a find/replace on the email you want to remove, and rebuild the jobs that way.
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
June 10, 2011 at 4:15 pm
Potentially you can do an update to msdb, but I would be very careful here.
You should not be sending to users, but to a distribution list of some sort. This way you remove the administration of the notification list to a central point.
Follow me on Twitter: http://www.twitter.com/way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
June 10, 2011 at 4:17 pm
Note that sp_update_job might be your best bet, script a loop through all jobs
http://msdn.microsoft.com/en-us/library/ms188745.aspx
Again, change this to a distribution list, not a list of individual emails
Follow me on Twitter: http://www.twitter.com/way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
June 10, 2011 at 4:19 pm
Thanks for the feedback guys. unfortunately I've been pushing our clients to convert over to distribution lists for years now, but the majority dont want to do it, so i'm stuck dealing with this pain in the arse.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply