0

When running a trace on my new SSRS Reporting Services 2016, after troubleshooting some problems related to migrating from SSRS 2008, I find the following pattern running continuously:

enter image description here

Here is the continuously run script:

--========================================================
--the script that is run over and over 
-- by the SSRS service
--========================================================



    declare @BatchID uniqueidentifier

    set @BatchID = NEWID()

    UPDATE [Event] WITH (TABLOCKX)
        SET [BatchID] = @BatchID,
        [ProcessStart] = GETUTCDATE(),
        [ProcessHeartbeat] = GETUTCDATE()
    FROM (

        SELECT TOP 4 [EventID] 
          FROM [Event] WITH (TABLOCKX) 
         WHERE [ProcessStart] is NULL 
      ORDER BY [TimeEntered]

        ) AS t1
    WHERE [Event].[EventID] = t1.[EventID]

    select top 4
        E.[EventID],
        E.[EventType],
        E.[EventData]
    from
        [Event] E WITH (TABLOCKX)
    where
        [BatchID] = @BatchID
    ORDER BY [TimeEntered]


set @BatchID = newid()

UPDATE [Notifications] WITH (TABLOCKX)
SET [BatchID] = @BatchID,
[ProcessStart] = GETUTCDATE(),
[ProcessHeartbeat] = GETUTCDATE()
FROM (

    SELECT TOP 4  [NotificationID] 
        FROM [Notifications] WITH (TABLOCKX) 
        WHERE ProcessStart is NULL and
    (   ProcessAfter is NULL 
        or ProcessAfter < GETUTCDATE()) 

    ORDER BY [NotificationEntered]

) AS t1
WHERE [Notifications].[NotificationID] 
        = t1.[NotificationID]

    select top 4
    -- Notification data
    N.[NotificationID],
    N.[SubscriptionID],
    N.[ActivationID],
    N.[ReportID],
    N.[SnapShotDate],
    N.[DeliveryExtension],
    N.[ExtensionSettings],
    N.[Locale],
    N.[Parameters],
    N.[SubscriptionLastRunTime],
    N.[ProcessStart],
    N.[NotificationEntered],
    N.[Attempt],
    N.[IsDataDriven],
    SUSER_SNAME(Owner.[Sid]),
    Owner.[UserName],
    -- Report Data
    O.[Path],
    N.[ReportZone],
    O.[Type],
    SD.NtSecDescPrimary,
    N.[Version],
    Owner.[AuthType],
    SR.[SubscriptionResult]
from 
    [Notifications] N with (TABLOCKX) 

    inner join [Catalog] O 
            on O.[ItemID] = N.[ReportID]

    inner join [Users] Owner 
            on N.SubscriptionOwnerID = Owner.UserID

    left outer join [SecData] SD 
                    on O.[PolicyID] = SD.[PolicyID] 
                AND SD.AuthType = Owner.AuthType

    left outer join [SubscriptionResults] SR 
                    on N.[SubscriptionID] = SR.[SubscriptionID] 
                AND CHECKSUM(convert(nvarchar(max),N.[ExtensionSettings])) 
                    = SR.[ExtensionSettingsHash]

where 
    N.[BatchID] = @BatchID
ORDER BY [NotificationEntered]

In the meantime SSRS generated another log. There is nothing significative in the log, it is all information only, as you can see on the partial view picture below:

enter image description here

All seems normal. So the question is:

What triggers the SSRS to generate a report - other than an exception or error somewhere?

Where in SSRS can I go to have a look\modify this behaviour if possible?

I have checked the config files: You should backup these alongside the report server databases:

  1. Rsreportserver.config
  2. Rssvrpolicy.config
  3. Rsmgrpolicy.config
  4. Reportingservicesservice.exe.config
  5. Web.config for the Report Server ASP.NET application
  6. Machine.config for ASP.NET

This is the log in question:

enter image description here

The modified date of the file has just changed and I noticed SSRS added information to this same file.

| improve this question | | | | |
1

The log in question I believe is

Report Server Service Trace Log and it turned ON by default

https://docs.microsoft.com/en-us/sql/reporting-services/report-server/report-server-http-log?view=sql-server-ver15

I figured this by checking where the log is stored in the question.

enter image description here

Trace log behavior is managed in the configuration file ReportingServicesService.exe.config. The configuration file is found in the following folder path:

\Program Files\Microsoft SQL Server\MSRS13.\Reporting Services\ReportServer\bin.

if you want to disable this logging you can do the below.

DefaultTraceSwitch Specifies the level of information that is reported to the ReportServerService trace log. Each level includes the information reported by all lower-numbered levels. Disabling tracing is not recommended. Valid values are:

0= Disables tracing. The ReportServerService log file is enabled by default. To turn it off, set trace level to 0.

You can tweak this value based on your requirements.

0= Disables tracing. The ReportServerService log file is enabled by default. 
   To turn it off, set trace level to 0.

1= Exceptions and restarts

2= Exceptions, restarts, warnings

3= Exceptions, restarts, warnings, status messages (default)

4= Verbose mode

More info here

| improve this answer | | | | |
0

SSRS creates a row in the dbo.Event table whenever it queues up a report. It appears all that you're observing is SSRS continuously checking to see if anything is queued so that it can be executed.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.