简体   繁体   English

我可以监视sql server 2008探查器中特定表的性能

[英]Can i monitor performance of particular table in sql server 2008 profiler

I want to monitor all the DML commands that run on a particular table of my database in sql server profiler. 我想在sql server profiler中监视在我的数据库的特定表上运行的所有DML命令。 Im using sql server 2008 R2 我使用的是sql server 2008 R2

Besides the suggested solutions, you can use a third party tool that reads SQL Server traces. 除了建议的解决方案,您还可以使用读取SQL Server跟踪的第三方工具。

ApexSQL Comply is a SQL Server auditing tool that used SQL traces, reads relevant information from them, and stores it into its central repository database. ApexSQL Comply是一个SQL Server审计工具,它使用SQL跟踪,从中读取相关信息,并将其存储到其中央存储库数据库中。 It allows you to select the tables and event types you want to monitor. 它允许您选择要监视的表和事件类型。 You can specify to monitor different set of events for every database. 您可以指定监视每个数据库的不同事件集。

在此输入图像描述

It provides various built-in reports, where you can filter by a specific DML operation. 它提供各种内置报告,您可以通过特定的DML操作进行筛选。 It also has custom reports, so you can create your own reports. 它还具有自定义报告,因此您可以创建自己的报告。

You can set the tool to monitor just specific events on the table, or if you monitor all events, you can use the filters on the reports to show just the DML commands. 您可以将工具设置为仅监视表上的特定事件,或者如果监视所有事件,则可以使用报告上的过滤器仅显示DML命令。

在此输入图像描述

在此输入图像描述

Disclaimer: I work for ApexSQL as a Support engineer 免责声明:我作为支持工程师为ApexSQL工作

Yes sure - you might want to check out this video series by Brad McGehee: 是的 - 你可能想看看Brad McGehee的这个视频系列:

Mastering SQL Server Profiler - Video Training Course 掌握SQL Server Profiler - 视频培训课程

It's very useful and teaches you the basics and some more advanced concepts of SQL Server Profiler. 它非常有用,并教您SQL Server Profiler的基础知识和一些更高级的概念。 Highly recommended. 强烈推荐。

Or here's the 10-minute short version by Brent Ozar: SQL Server Profiler Tutorial Video 或者这是Brent Ozar的10分钟短版: SQL Server Profiler教程视频

In SQL Server Profiler, when you create a new profile trace, you can define filters . 在SQL Server Profiler中,创建新的配置文件跟踪时,可以定义过滤器 You can limit the stats being collected by a ton of different criteria - one of them being the Object Name , eg the table name you want to check for. 您可以通过大量不同的标准限制收集的统计数据 - 其中一个是Object Name ,例如您要检查的表名称。

See Profiler Filters for more information on that particular topic. 有关该特定主题的更多信息,请参见Profiler过滤器

Depending upon your exact needs you might also want to look into extended events . 根据您的确切需求,您可能还需要查看扩展事件 This has several advantages over using SQL Profiler/ SQL Trace in terms of performance, flexibility of filters, and the information available. 与在性能,过滤器的灵活性和可用信息方面使用SQL事件探查器/ SQL跟踪相比,这有几个优点。

If you do decide to investigate this further you might find my answer to another question useful for getting up and running. 如果您决定进一步调查此问题,您可能会找到另一个对启动和运行有用的问题的答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM