SharePoint provides an out-of-the-box solution for collecting usage data. To get started, click the Monitoring link in the Central Administration console and select the Configure usage and health data collection option to bring up the Configure web analytics and health data collection page. Make sure the Enable usage data collection check box is selected, then choose the events you want to log (e.g., Page Requests). If PowerPivot for SharePoint is installed, make sure that all PowerPivot-specific logging events are also selected.
In the Logging Database Server section, enter the name of the instance and database where the usage data will be stored. Clicking the Log Collection Schedule link in the Log Collection Schedule section brings you to a page in which you can configure (or optionally manually run) two timer jobs:
- Microsoft SharePoint Foundation Usage Data Import. This job loads data from the usage logs into the logging database. By default, it runs every 30 minutes.
- Microsoft SharePoint Foundation Usage Data Processing. This job deletes data that's older than 30 days. By default, it runs once daily at 3:00 a.m. If SharePoint Web Analytics is configured, the data will be moved to the Web Analytics database before it is deleted. If PowerPivot for SharePoint is installed, this job will move PowerPivot usage data to the PowerPivot service application database. Note that because the PowerPivot Management Dashboard ultimately relies on the PowerPivot Management Data.xlsx as its data source, the PowerPivot Data Management Dashboard Processing timer job also needs to run before the dashboard will reflect the most recently loaded data. By default, this job runs daily at 5:00 a.m.
To understand how the logging database stores data, click the Monitoring link in the Central Administration console, select the View health reports option, and run one of the built-in reports (e.g., Slowest Pages) with SQL Server Profiler running in the background. I used this technique to build the SQL Server Reporting Services (SSRS) reports that display page usage for PerformancePoint Services (PPS) and Excel Services. Much of the usage data is accessible through a view named RequestUsage.
See main article: Monitoring SQL Server and SharePoint BI Components