我刚刚使用 SQL Server Profiler 监视了我的 SQL Server 数据库请求。我认为ReportServer
数据库每 5 秒发送 2 个批处理请求 - 见下图。
我还在我的本地数据库引擎上进行了尝试,以确保没有从用户那里调用任何报告,但是请求再次每 5 秒发送一次,与服务器相同
我阅读了两个请求的内容,这对于所有请求都是相同的,其中一个更新数据库event
表,ReportServer
然后从event
表中选择前 8 个
另一个更新 notification
表,然后从notification
与其他三个表连接的表中选择前 8 个
这是 Profiler 的 textData 列中的代码(批量查询)
请求 1:
declare @BatchID uniqueidentifier
set @BatchID = NEWID()
UPDATE [Event] WITH (TABLOCKX)
SET [BatchID] = @BatchID,
[ProcessStart] = GETUTCDATE(),
[ProcessHeartbeat] = GETUTCDATE()
FROM
(SELECT TOP 8 [EventID]
FROM [Event] WITH (TABLOCKX)
WHERE [ProcessStart] IS NULL
ORDER BY [TimeEntered]) AS t1
WHERE
[Event].[EventID] = t1.[EventID]
SELECT TOP 8
E.[EventID], E.[EventType], E.[EventData]
FROM
[Event] E WITH (TABLOCKX)
WHERE
[BatchID] = @BatchID
ORDER BY
[TimeEntered]
要求 2:
declare @BatchID uniqueidentifier
set @BatchID = newid()
UPDATE [Notifications] WITH (TABLOCKX)
SET [BatchID] = @BatchID,
[ProcessStart] = GETUTCDATE(),
[ProcessHeartbeat] = GETUTCDATE()
FROM
(SELECT TOP 8 [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 8
-- 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]
首先,我想知道这些烦人的请求每 5 秒发送一次的原因是什么,即使所有请求中的两个选择的结果都是空的,并且没有对报告服务的实际请求(似乎他们没有做任何特别的事情,因为事件和通知表都是空的)
其次,我怎样才能停止这个从数据库每 5 秒发送一次无用请求**的过程ReportServer
?
请注意,我想让我的报告服务保持正常运行,这样我就无法停止它的服务,我只想停止发送无用的请求。
提前致谢