SQL Server Profiler - 如何过滤跟踪以仅显示包含 DELETE 语句的 TSQL?
我有一个 SQL 跟踪设置来监视向单个数据库发出的所有 TSQL。但是我只关心发出的“DELETE”TSQL 语句。有什么方法可以过滤仅向探查器报告这些类型的语句吗?谢谢!
I have a SQL Trace setup to monitor all TSQL being issued to a single database. However I only care about 'DELETE' TSQL statements being issued. Is there any way I can filter to just reporting these type of statements to the profiler? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
设置跟踪时,转到事件选择并仅选择
TSQL->Batch Completed
。现在单击列过滤器
按钮并选择TextData
->点赞
并写下%delete%
。应该可以做到这一点。编辑:在
删除
周围添加了百分号(%
),因为需要它们才能使其正常工作。When setting up your trace, go to event selection and select only
TSQL->Batch completed
. Now click thecolumn filters
button and chooseTextData
->Like
and write%delete%
. That should do it.EDIT: Added percent signs (
%
) arounddelete
because they are needed to make it work.