SQL Server Profiler - How to filter trace to only display TSQL containing a DELETE statement?

Deadly 提交于 2019-11-29 02:53:16

问题


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!


回答1:


When setting up your trace, go to event selection and select only TSQL->Batch completed. Now click the column filters button and choose TextData -> Like and write %delete%. That should do it.

EDIT: Added percent signs (%) around delete because they are needed to make it work.



来源:https://stackoverflow.com/questions/7903208/sql-server-profiler-how-to-filter-trace-to-only-display-tsql-containing-a-dele

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!