简体   繁体   中英

Trace the Repository 's Get method with SQLPROFILER

I have a performance issue caused by a latency in return from the Repository 's Get method.

  var res = Data.TicketRepository.GetSingle(filterExpression, includeNavigations);

So i configured a trace on my database to view the sql statement generated by that linq-to-sql function. However after the debugger finish with that method i don't get any trace in the profiler.

what mi doing wrong?

Is it possible for the profiler to track the execution that have been triggred outside of SSMS?

Is it possible for the profiler to track the execution that have been triggred outside of SSMS?

Yes. You're doing something wrong. Profiler can track activity from every session.

If you discover your sessions session_id by running select @@spid , you can filter that in Profiler.

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM