Leveraging the logging database to see performance counters
November 16, 2011
Posted by on
SharePoint Server 2010 ships with a logging database (default name: WSS_Logging). You can make sure information gets added into it by opening SharePoint Central Administration > Monitoring > Timer Jobs > Review Job Definitions and enable or run all timer jobs starting with “Diagnostic Data Provider”.
After that, if you want to take a look at the performance counters, you can use the PerformanceCounters view in the logging database. Since it only shows counterid’s, the view in itself is not very helpful unless combined with information coming from the PerformanceCountersDefinitions table that includes the path and the instance name of the performance counters, like this:
SELECT TOP 1000 [PartitionId]
join [WSS_Logging].[dbo].[PerformanceCountersDefinitions] pd ON counterid = pd.id