Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 email notification

Author  Topic 

carumuga
Posting Yak Master

174 Posts

Posted - 2009-10-19 : 22:17:00
I have a list of jobs which is quite high in numbers and need to replace the success or failure notication email ids to the new one in all jobs. The jobs involves steps in calling SSIS/DTS/TSQL/...

Please let me know the way to replace the mailids with the new one.

Thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-10-20 : 13:36:51
Loop through the jobs via sysjobs and then call sp_update_job for each one you want to update.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-10-20 : 13:39:16
I wrote a blog a while back that does sort of what you want. It disables all jobs on a SQL instance, but it should give you enough of a template to get going with what you want. It does the looping and calls sp_update_job for each pass through the loop. Modify it as needed.

Here's the blog: http://weblogs.sqlteam.com/tarad/archive/2003/10/17/325.aspx


Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -