添加SQLServer监视时,可能会出现如下错误:
Monitor name :MS SQL Server. Cannot create measurement SQLServer|User Connections| on machine 127.0.0.1.
Details:在计算机上找不到指定的对象。
Hint:
Check that there is such a measurement on this machine.
Check that you selected the right platform. for the monitored machine in the Add Machine dialog box.
Note: When you monitor a Win2000 machine from an NT, some counters may not be available.
Try to delete this measurement and add it again (use the Add Resources dialog box ) (entry point: CFactory::Addmeasurement ).[MsgId: MMSG-47296]
监控SQLSERVER时,能增加度量。但是只有系统资源相关的度量有数据,而和sqlserver相关的度量却没有数据,此时你可能会怀疑,是不是数据库的连接配置有问题,但你在开始-程序菜单中,手工打开SQL SERVER软件时,是可以连接并登录的,说明SQL SERVER连接配置是没有问题的。
可能的解决方法:
改为在System Resource Graphs中通过像添加Windows Resources一样的方式手工添加SQLServer计数器则可以添加成功,添加的对象是SQLServer:General Statistics
一般来说,应该收集哪些SQLServer的性能指标?
一般需要监控以下指标:
1)SQLServer资源监控中指标缓存点击率(Cache Hit Ratio),该值越高越好。如果持续低于80%,应考虑增加内存。
2)如果Full Scans/sec(全表扫描/秒)计数器显示的值比1或2高,则应分析你的查询以确定是否确实需要全表扫描,以及SQL查询是否可以被优化。
3)Number of Deadlocks/sec(死锁的数量/秒):死锁对应用程序的可伸缩性非常有害,并且会导致恶劣的用户体验。该计数器的值必须为0。
4)Lock Requests/sec(锁请求/秒),通过优化查询来减少读取次数,可以减少该计数器的值。