woensdag 24 april 2013

SharePoint 2010 Alerts

How to send daily alerts immediately in SharePoint 2010?
If you create new daily alert and want to see whether it will work or not it is not very convenient to wait 24 day until SharePoint will sent them next time. In this post I will show how to trigger summary alerts and send them when you need.
When you add a new daily alert on a list or something a new row is added to the SchedSubscriptions table into the SharePoint content database. The most important columns in this table are NotifyTime and NotifyTimeUNC. In these columns stores SharePoint the time when next time daily alert for particular list will be send.
Step 1: Get the id of the daily alert that you want to modify
SELECT * FROM SchedSubscriptions
Step 2: Copy the Id and execute the following SQL query:
declare @s datetime
declare @u datetime
set @s = CAST('2013-04-24 10:00:00.000' as datetime)
set @u = CAST('2013-04-24 07:00:00.000' as datetime)

update dbo.SchedSubscriptions
set NotifyTime = @s, NotifyTimeUTC = @u
where Id = '. . .'
Notice that the NotifyTimeUNC = NotifyTime minus 3 hours.
After that wait some time. Exact time of waiting depends on the Recurring Schedule of the Immediate Alert timerjob.

1 opmerking: