In SharePoint 2010, you can turn off all alerts through Central Admin under Application Management, Web Applications, General Settings:

 


 

Another option is to write a little utility.

 

I wrote a little WinForms utility to delete all user alerts in a site collection. We needed this when we backposted a content database from Production down to QA. We didn’t want to start firing alerts off the QA environment so you could either disable SMTP outgoing email or just wipe the alerts.

 

How to do it: Create a WinForms Application in Visual Studio, add a few fields, buttons, radios.

 

The Verify Alerts just checks your data without actually deleting it so you can see what you would have deleted.

 


 

 

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

using Microsoft.SharePoint;

 

namespace DeleteUserAlerts

{


public
partial
class
Form1 : Form

{


public Form1()

{

InitializeComponent();

radioButtonVerify.Checked = true;

}

 


private
void btnSubmit_Click(object sender, EventArgs e)

{


string webUrl = txtUrl.Text;

 


using (SPWeb oWebsite = new
SPSite(webUrl).OpenWeb())

{


SPWebCollection collWebsite = oWebsite.Webs;

 


foreach (SPWeb subSite in collWebsite)

{

txtMessage.Text += System.Environment.NewLine + “Site: “ + subSite.Name + System.Environment.NewLine;

DeleteAlerts(subSite);

}

}

}

 


public
void DeleteAlerts(SPWeb subSite)

{


SPUserCollection collUsers = subSite.SiteUsers;


foreach (SPUser oUser in collUsers)

{

 


SPAlertCollection collAlerts = oUser.Alerts;

 


for (int i = collAlerts.Count – 1; i > -1; i–)

{

System.Guid guid = collAlerts

[i].ID;

 


if (radioButtonDelete.Checked == true)

{

txtMessage.Text += “Deleting: “ +

oUser.Name + ” “ + collAlerts[i].AlertTemplate.Name + ” “ + guid + System.Environment.NewLine;

 

collAlerts.Delete(guid);

 

}//


else

{

txtMessage.Text += “Verified: “ +

oUser.Name + ” “ + collAlerts[i].AlertTemplate.Name + ” “ + guid + System.Environment.NewLine;

 

}//

}

 

}//foreach

}

 

 

 

}

}