还是SQL Server profiler

本文探讨了SQLServer中未预料的资源占用问题,作者发现即使未运行任何应用或SQL脚本,数据库资源仍被占用。通过排查,最终定位到ReportServer插件及其服务为根本原因,揭示了即使不使用,ReportServer也会消耗服务器资源的现象。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 I tries to check the SQL Scripts  several months ago, actually I didn't run any application which connected my database and also didn't run SQL Script manually, meanwhile, there is no any jobs in the back-end; but I found there were many pieces of SQL scripts captured by SQL Server profiler, such as the follwoing T-SQL;  then I checked the jobs of my database and no job was working at that time, it made me surprised, then I double checked the the result of SQL Server profiler, finally found I installed  the plugin of reportserver and its services was working.   so that was the root reason.

 

AIM:

1. once you install reportserver in your computer if the status of its service running,  even if you don't do anything in it, it will take up some some resource of your server. if not used, please disable its service.

 

 

 


declare @BatchID uniqueidentifier

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]
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
where
N.[BatchID] = @BatchID
ORDER BY [NotificationEntered]

转载于:https://www.cnblogs.com/TerryX168/p/5631268.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值