Abhishek Bhowmick | SharePoint Blog

Alerts does not work for changes done

Posted in Sharepoint by Abhishek Bhowmick on September 18, 2008

SYMPTOMS:
Users do not recieve alerts for changes made to items although “Immediate alerts” are enabled in the site collection.
 
POSSIBLE CAUSES:
• The EventData and ACL columns in the SQL Content Database are not written correctly for this specific content database.
• The record is not processed by the timer service job correctly for this specific content database.
• The record is processed correctly. However, the email delivery mechanism is not working fine. For example, the alert templates fail to be picked up by the SharePoint Timer Service.
• Email server is not working.
 
RESOLUTION:
• Open Central Administration
• Click on Operations and then Timer Job Status
• Made sure the two jobs “Change Log “ and “Immediate Alerts” were showing “Success” and 100%
• Open the command window and navigate to C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN> and run the following command: stsadm -o getproperty -url <http://siteurl> -pn alerts-enabled
• The expected output is <Property Exist=”Yes” Value=”yes” />
• Make sure the account running the SharePoint Timer Service is the account which has the administrator Full Control permission over the site and the full permission
on the content database.
• Restart the SharePoint Timer Service.
• In content database verify the EventData and ACL are not NULL for the specific content database. This seems to be the key to the problem sometimes.
• Check for the following: C:\Program Files\Common Files\Microsoft Shared\web server
extensions\12\BIN>stsadm.exe -o getproperty -url <
http://siteurl> -pn job-immediate-alerts
• Expected result is Property Exist=”No” for that specific site
• Use the following command to reset the schedule
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm -o setproperty -url <http://siteurl> -pn job-immediate-alerts -pv “every 5 minutes between 0 and 59”
 
ADDITIONAL INFORMATION:
The internal working mechanism of how an alert works in Windows Sharepoint Services 3.0:
• The EventCache table records the SQL level events as they occur and the EventData and ACL columns are not NULL for an alert event.
• There is an alerts timer job that runs periodically to process the records in the EventCache. After the alerts timer job runs, it nulls out the EventData and ACL columns.
• It will log an event into the EventLog table.
 
MORE TROUBLESHOOTING STEPS:
• Open SQL Query Analyzer and connect to the content database of concerned site.
• Run the following query in SQL and copy the result out: Select * from timerlock
If the issue persists, collect the following information:
• Run the following query against the content database of concerned site: Select * from eventcache where EventData is not null
This will show all the subscriptions which have not been processed yet. We can see if there are some alerts which are not processed.
• Run the following query: Select * from eventlog where ListID = ‘xxx’. This would give you the ListID from the EventCache table by running Select * from EventCache and check the documents which correspond to the
concerned listor document library.
• If you cannot find any record in the step 1, please perform the following tests: Get a filemon trace on the Sharepoint server and see if the Timer service picks up the alert template during the whole process.
 
How to collect the filemon trace:
• Create a new item in the list or document library where the alerts should work and start Filemon
•  Run the following query: Select * from eventcache order by EventTime DESC
• Check if the latest result is the one corresponds to your uploaded document. Make sure the EventData and ACL columns are not NULL.
•  After some time, check the EventCache table again to see if the EventData and ACL columns are NULL.
•  If yes, stop Filemon after the EventData and ACL columns are NULL.
•  Analyze the Filemon trace for more information
Advertisements
Tagged with:

7 Responses

Subscribe to comments with RSS.

  1. Iqbal Sayed said, on November 13, 2008 at 11:56 am

    Will This change the TIMER JOB to run every 1 minute ??????

  2. Iqbal Sayed said, on November 13, 2008 at 12:11 pm

    I want to run the incremental crawl after 1 minute of the Full Crawl in MOSS. .. For that i would require Timer Job to fire every 1 Minute.

    Thanks,

  3. Abhishek Bhowmick said, on November 14, 2008 at 7:41 am

    This will not make the Timer Job to run every 1 minute. Instead it sets the property for the Timer Job created specifically for triggering alerts in the Event Cache table with reference to the Content Database of the SharePoint site to be fired in that time duration you specify. Timer Job for incremental crawl would not get impacted with this operation.

  4. Iqbal Sayed said, on November 25, 2008 at 7:59 pm

    Thats what my question was. I want to make sure that the Incremental Crawl runs at every 1 minute for which i have created a schedule. But it does not work. Any of your “Cutting Edge” comments are welcomed.

  5. Bruce Cao said, on March 1, 2009 at 11:27 pm

    I love the approach you take to viewing the problem, assessing the possible solutions, and running through your steps to get your solution fixed. It gives a sense of where I am and how my situation compares to your situation which helps me differentiates what parts are working correctly.

    Anyways onto the question. At the 3rd resolution bullet (Made sure the two jobs “Change Log “ and “Immediate Alerts” were showing “Success” and 100%) My Change Log is Succeeded 100% but my Immediate Alerts are Failed (WFE1) Aborted (WFE2) and Failed (WFE3). I moved onto the bullet 4 and it did give me the same result as you stated in bullet 5. Same with bullets 9 and 10. I’ve tried to stop/start via the setproperty command with various -pv switches but nothing seems to have worked. I’m thinking the Immediate Alerts not succeeding is the main issue but don’t really know where to start tackling that. I figured the STSADM command(s) would address that but it hasn’t.

    I’ve researched more into the workings of timer jobs, how to create/implement them to try to get a better understanding. Would you have any insight on how to approach the fixing eh Timer Jobs to get them back to succeed?

    They were working one day then the next it stopped; no changes (major or minor) were done to the environment, it just went down.

    I’d appreciate any guidance you offer. TIA

  6. Jane said, on November 2, 2009 at 2:02 pm

    Thanks Abhishek Bhowmick, the alerts are working now. You made my day.

    Thanks again.

  7. Angelo said, on November 20, 2010 at 4:00 am

    I followed all the steps you gave and I found several entries in the SQL server (870 rows) after running the select * from EventCache where EventData is not null command.
    If the alerts still don’t work and I have verified that all the permissions are there and are correct, what else could cause the alerts not to work.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: