Advertisement
private775

SQL: SharePoint Performance counters

Dec 31st, 2015
287
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.55 KB | None | 0 0
  1. SELECT
  2.     pcd.Counter
  3.     ,pcd.Instance
  4.     ,pcd.Category
  5.     ,CONVERT(datetime, SWITCHOFFSET(CONVERT(datetimeoffset, pc.[LogTime]), DATENAME(TzOffset, SYSDATETIMEOFFSET()))) AS LogTimeLocal
  6.     ,pc.[LogTime] AS LogTimeUtc
  7.     ,pc.[MachineName]
  8.     ,pc.[CounterId]
  9.     ,pc.[VALUE]
  10. FROM [SP_ContentUsage].[dbo].[PerformanceCounters] pc
  11. JOIN [SP_ContentUsage].[dbo].PerformanceCountersDefinitions pcd ON pcd.Id = pc.CounterId
  12. WHERE pcd.Counter = 'Available Mbytes'
  13. -- where pcd.Counter = '% Processor Time'
  14. ORDER BY pc.MachineName, pc.RowCreatedTime
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement