文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>SQL Server Profiler 跟踪不断出现检索数据

SQL Server Profiler 跟踪不断出现检索数据

时间:2011-05-06  来源:冰の酷龙

     用SQL Server Profiler跟踪SQL的时候,老是出现下面的执行.而且不间断,隔几秒就会出现一次,很是恼火.找了半天,发现是

ReportServer数据库里面的表.但是总不能删掉这个数据库把.后来网上找了下,关掉Report服务就行了,打开Reporting Services

配置管理器,停掉服务,总算清静了.继续优化项目.

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],
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]
相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载