监控规划服务器数据库的状态

更新: 2009-04-30

数据库管理员应定期监控 规划服务器数据库的运行状况和性能。在规划服务器监控中,索引碎片监控和碎片整理是重要的组成部分,我们会有专门的内容单独介绍它们。

监控规划数据库的状态有两种方法。下面的部分着重介绍从规划服务器应用程序的角度进行监控。另一种方法涉及常规 Microsoft SQL Server 2005 运行状况监控。有关常规 SQL Server 监控的信息,请参阅附录 A:监控 SQL Server 的运行状况。有关监控 SQL Server 计算机的详细信息,请参阅 SQL Server Books Online

示例查询

下列查询可用于检查您的系统状态并监控规划服务器系统。对 PerformancePoint 规划应用数据库运行每个查询。

当前队列项,包括计划要在将来运行的所有项目

select * from asyncworkitems with (NOLOCK)
where methodname = 'AsyncSubmit' ---and itemcompletionstatus = 4
and (itemstartDateTime is null or itemenddatetime is null)

当前队列项,不包括计划要运行的所有项目

select * from asyncworkitems with (NOLOCK)
where methodname = 'AsyncSubmit' ---and itemcompletionstatus = 4
and (itemstartDateTime is null or itemenddatetime is null)
and scheduleddatetime > getutcdate()

前一个小时处理的项目

select count(*) as [Count], avg(datediff(second, itemstartdatetime, itemenddatetime)) as [Avg],max(datediff(second, itemstartdatetime, itemenddatetime)) as [Max], min(datediff(second, itemstartdatetime, itemenddatetime)) as [Min] from asyncworkitems with (NOLOCK)
where methodname = 'AsyncSubmit'
and (itemstartdatetime is not null and itemenddatetime is not null)
and dateadd(minute, 60, itemenddatetime) > getutcdate()

前一个小时提交的项目

select count(*) as [Count]
from asyncworkitems with (NOLOCK)
where methodname = 'AsyncSubmit'
and dateadd(minute, 60, submissiondatetime) > getutcdate()

select top(10) datediff(second, itemstartdatetime, itemenddatetime), datediff(second, submissiondatetime, itemenddatetime) from asyncworkitems with (NOLOCK)
where methodname = 'AsyncSubmit'
order by itemenddatetime desc

距下次多维数据集处理还有多长时间

select datediff(second, getutcdate(), scheduledDatetime)  from asyncworkitems where methodname like 'asyncprocess%' and itemenddatetime is null and itemstartdatetime is null

另请参阅