Monday 30 March 2015

SSRS - Check Report Rendering Time

Here SQL Reporting Server have log our reports processing time in table and We have a View "ExecutionLog3" in SQL Server.

Following Query will gives us the total time (Minutes) taken by the SSRS report to generation.

This Query help us to find out the exact time of every stage.

  1. TimeDataRetrieval : Give us time to data retrieval by SQL Server
  2. TimeProcessing : Give us time processed to bind with the DataSet.
  3. TimeRendering : Give us time to rendering(Formatting) the SSRS report.


use ReportServer

select top 10 
  InstanceName,
  ItemPath,
  UserName,
  CAST((TimeDataRetrieval)as numeric(18,2))/60000 TimeDataRetrieval,
  CAST((TimeProcessing)as numeric(18,2))/60000 TimeProcessing,
  CAST((TimeRendering)as numeric(18,2))/60000 TimeRendering,
  CAST((TimeDataRetrieval+TimeProcessing+TimeRendering)as numeric(18,2))/ 60000 [Total_Time(Minutes)]
 from ExecutionLog3




Tuesday 17 March 2015

SSRS - Temporary Disable All Subscriptions

Temporary Disable Subscriptions


The InActiveFlags field in dbo.Subscriptions can be 1 or 0 (true or false).


--Code Snippet
--To Check Subscription Status.
USE ReportServer
SELECT dbo.Subscriptions.Description,
       dbo.[Catalog].Name,
       dbo.Users.UserName,
       InactiveFlags
FROM dbo.Subscriptions 
     INNER JOIN dbo.[Catalog] 
     ON dbo.Subscriptions.Report_OID = dbo.[Catalog].ItemID 
     INNER JOIN dbo.Users 
     ON dbo.Subscriptions.OwnerID = dbo.Users.UserID

------------------------------------------------------------------------------------------

--Temporary disables subscriptions while data warehouse is unavailable

UPDATE dbo.Subscriptions
SET InactiveFlags = 1
GO
--After this you can find, all the subscription where disabled until you again enable it.

Again enable subscriptions.

UPDATE dbo.Subscriptions
SET InactiveFlags = 0