5

I am trying to find an example of a specific exploit in our sql server traces and I want to filter the TextData column for '%' occurring three times: %%%.

This means that I have to escape the special character %.

One try was to use '\' as an escape char like this: %\%\%\%%

Another try was to specify it as a range: %[%][%][%]%.

In SQL we can specify the escape character to use for the LIKE operator, but is there a way to do it when we filter in SQL Server Profiler?

Ovidiu Pacurar
  • 8,173
  • 2
  • 30
  • 36

1 Answers1

0
-- Syntax for SQL Server and Azure SQL Database  
  
match_expression [ NOT ] LIKE pattern [ ESCAPE escape_character ]

https://learn.microsoft.com/en-us/sql/t-sql/language-elements/like-transact-sql?view=sql-server-ver15

Ovidiu Pacurar
  • 8,173
  • 2
  • 30
  • 36