Wednesday, January 23, 2013

Various Warning Emails in SharePoint 2010

I was working on setting up warning emails on my SharePoint farm, both for Site Quota warnings and warning emails for deleting unused sites. SharePoint provides these two features which can be used, but there has always been confusion about who will be receiving the emails. Before I answer that, lets discuss about the set up for sending out such warning emails.

1> First and foremost is to set up the outbound email settings from SharePoint Central Administration, as shown in the screenshot below. Go to Central Administration >> System Settings >> Configure outgoing e-mail settings


Provide the details of the SMTP as shown in the screenshot below otherwise the other configurations related to Warning emails will be greyed out.

2> Now go to the Central Administration >> Application Management and click on "Confirm Site Use and Deletion" as shown in the screenshot below.

3> On this page one can provide all the details as per the requirement and click on OK. The information would be when would the notifications start going to the site collection administrators and also if auto deletion would be opted for such unused sites as shown in the screenshot below.


 4> The e-mails that are generated because of this setting goes to the Primary Site Collection Administrator only. It doesn't go any other site administrator nor to secondary site collection administrator. You can check the primary site collection administrator by going to Central Administration >> Application Management >> Change Site Collection Administrators . Once can validate the Primary Site collection Administrator there.

5> For the Site Quota Warning, one has to go to Central Administration >> Application Management >> Configure Quotas and Locks . In that option, we need to enable check box inorder to send warning emails when the site collection storage is reaches to a warning limit as shown in the screenshot below.



6> These emails once configured will be sent to the Site Collection Administrators. But these Site Collection Administrators are the ones present in the path
Go to the Site Collection >> Site Actions>> Site Settings >> User and Permissions > Site Collection Administrators.

So, one can add more administrators in that group inorder to get the Site Quota Warnings emails.

Hope this helps and clarifies the doubts about the Warning emails sent by SharePoint 2010.
 

Thursday, January 10, 2013

Not able to delete SharePoint 2010 Web Analytics orphaned databases

I was working on cleaning up the sharepoint farm. I tried to delete the Web Analytics Service Application from the UI but was not able to do so. It was not allowing me to delete the service application from PowerShell either and threw the below error.

Exception calling "Delete" with "0" argument(s): "An object in the SharePoint a
dministrative framework, "WebAnalyticsWarehouseDatabase Name=WebAnalyticsServiceApplication_ReportingDB", could not be deleted because other objects depend on it. Update all of these dependants to point to null or different objects and retry this operation. The dependant objec
ts are as follows: WebAnalyticsServiceApplication Name=Web Analytics Service Application"


 I went to the Central Administration --> Upgrade & Migration --> Review Database Status. I observed that the Web Analytics databases were in "not responding" status.

After some analysis, I found that there were timer jobs that were using the databases which didn't allow to delete the service application. The Timer jobs are as follows -

Health Analysis Job (Daily, Web Analytics Data Processing Service, Any Server)
Health Analysis Job (Daily, Web Analytics Web Service, Any Server)
Microsoft SharePoint Foundation Usage Data Processing
Microsoft SharePoint Foundation Usage Data Import
Microsoft SharePoint Foundation Site Inventory Usage Collection


I went ahead and disabled the jobs. Then I went ahead and deleted the service application from the UI. It got deleted successfully without any issues. I ran the powershell command to clean up any orphaned database present on the sharepoint farm by running the below script

Get-SPDatabase | Where{$_.Exists -eq $false} | ForEach {$_.Delete()}