Wednesday, 18 December 2013

SQL Server Report Server Investigations

The following SQL will let you find the worst performing reports, and also the ones that error on your reporting services database instance.


SELECT C.Path,
    C.Name

          , E.Requesttype
           --WHEN 1 THEN 'Subscription'
           --WHEN 0 THEN 'Report Launch'
           --ELSE ''
           --END
          ,E.TimeStart
          ,E.TimeProcessing
          ,E.TimeRendering
          ,E.TimeEnd
          ,[TimeTotal (ms)] = DATEDIFF ( millisecond , E.TimeStart , E.TimeEnd )
          ,E.Status
          ,E.InstanceName
          ,E.UserName
     FROM Reportserver.dbo.ExecutionLog E (NOLOCK)
     INNER JOIN Reportserver.dbo.Catalog C (NOLOCK)
       ON E.ReportID = C.ItemID
WHERE 1=1
--    WHERE C.Name = 'Project Full Control Comments'
and E.Requesttype = 0
and E.Status <> 'rsSuccess'

ORDER BY [TimeTotal (ms)] DESC

No comments:

Post a Comment

Thames water collapsed drain cover

15/10/2018 After fixing our sewage drain cover, there appears to be a mini sinkhole occurring around our Thames Water meter cover. We’re w...