SQL Server Profiler : How to specify multiple values for “NOT LIKE” column filter

喜欢而已 提交于 2019-11-28 21:48:42

问题


According to : http://msdn.microsoft.com/en-us/library/ms175061.aspx It says that the "NOT LIKE" relational operator : "Specifies that the trace event data must not be like the text entered. Allows multiple values."

But HOW do you specify multiple values ?


回答1:


Never mind, figured it out. After you have typed in one value, press ENTER at the end of the textbox. This causes another textbox to be shown under the current one, into which you can type an additional value.




回答2:


This is tricky , if you add with enter multiple in the like area this will OR them. I usally want AND. In not like area or is great , is any of the values in the rows ignored . So for example I was searching for DELETE statements on a specific table. For this in TextData

like ->
     %table_name%

not like ->
     %insert%
     %update%
     %select%

With this limiting to only delete . This is not perfect if there is a delete with a select text inside it will not run. Try to filter less and then increase your filter based on your production data.

After this tested with a

Begin transaction
delete from table_name where 1=2
rollback 

all perfect !!! Profiler had my statement on screen



来源:https://stackoverflow.com/questions/6366216/sql-server-profiler-how-to-specify-multiple-values-for-not-like-column-filte

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