开发者

How to profile for one table in SQL Server?

开发者 https://www.devze.com 2023-01-23 06:56 出处:网络
How can I add a filter which can trace sql statements for a part开发者_开发问答icular table name?You can\'t set filter to trace specific table directly.

How can I add a filter which can trace sql statements for a part开发者_开发问答icular table name?


You can't set filter to trace specific table directly.

What you can do is specify a filter for Text Data:

File -> Properties -> Event Selection -> Column Filters -> TextData -> Like -> [Table Name]


This is how I could do it....

Choose below events in the profiler:

  • Audit Database Object Access Event
  • Audit Fulltext
  • Audit Schema Object Access Event

Make sure to choose Text Data, under columns.

Then under column filters choose:

  • DatabaseID ---> enter specific databaseID
  • ObjectId ---> enter specific objectID (select from sysobjects for that specific table)
  • ObjectName ---> enter required tablename
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号