Configuration
什麼觸發 SSRS 生成日誌文件或修改目前文件?
在我的新 SSRS Reporting Services 2016 上執行跟踪時,在對與從 SSRS 2008遷移 相關的一些問題進行故障排除後,我發現以下模式持續執行:
這是連續執行的腳本:
--======================================================== --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]
與此同時,SSRS 生成了另一個日誌。日誌中沒有任何意義,它只是所有資訊,如下面的局部視圖圖片所示:
一切看起來都很正常。所以問題是:
是什麼觸發了 SSRS 生成報告——除了某處的異常或錯誤?
如果可能,我可以在 SSRS 的哪個位置查看\修改此行為?
我檢查了配置文件:您應該將它們與報表伺服器數據庫一起備份:
- rsreportserver.config
- Rssvrpolicy.config
- rsmgrpolicy.config
- Reportingservicesservice.exe.config
- 報表伺服器 ASP.NET 應用程序的 Web.config
- 用於 ASP.NET 的 Machine.config
這是有問題的日誌:
文件的修改日期剛剛更改,我注意到 SSRS 在同一個文件中添加了資訊。
我認為有問題的日誌是
報告伺服器服務跟踪日誌,預設開啟
我通過檢查日誌在問題中的儲存位置來計算這一點。
跟踪日誌行為在配置文件 ReportingServicesService.exe.config 中進行管理。配置文件位於以下文件夾路徑中:
\Program Files\Microsoft SQL Server\MSRS13.\Reporting Services\ReportServer\bin。
如果您想禁用此日誌記錄,您可以執行以下操作。
DefaultTraceSwitch 指定報告給 ReportServerService 跟踪日誌的資訊級別。每個級別都包含所有編號較低的級別報告的資訊。不建議禁用跟踪。有效值為:
0= 禁用跟踪。ReportServerService 日誌文件預設啟用。要關閉它,請將跟踪級別設置為 0。
您可以根據自己的要求調整此值。
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
更多資訊在這裡