Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for Script to Create Alerts, Operators 1

Status
Not open for further replies.

JohnBates

MIS
Feb 27, 2000
1,995
US
hi all,

I'm using 2005.

Do you know of a way of scripting the operators and Alerts?

I need a script to use when we need to failover to the alternate database server.

Thanks, John
 
You should be able to right click on the alert and the operator and select script, then create. Failing that sp_add_alert or sp_add_operator would be the commands to use.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
Yeah. I was looking for a script that I could schedule to run once per week and save the output over on the failover server.

John
 
If memory serves there is an SSIS task to copy operators and alerts from server to server.

To do it via script you will have to write something which can dynamically generate the script based on the data within the system tables in the msdb database.

It's usually easier to simly make sure that whenever new operators and alerts are added to deploy them to both servers at the same time.

Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration / Microsoft Office SharePoint Server 2007: Configuration)
MCITP Database Administrator (SQL 2005) / Database Developer (SQL 2005)

My Blog
 
thanks mrdenny. I'll check out the SSIS task and if it exists I can schedule the package. Should work.
John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top