SQL Server Profiler不显示LINQ To SQL查询 [英] SQL server profiler not showing LINQ To Sql queries

查看:260
本文介绍了SQL Server Profiler不显示LINQ To SQL查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在SQL Server Profiler(2005)中查看Linq生成的SQL到SQL.

I am trying to view SQL generated by Linq to SQL in the SQL Server Profiler (2005).

我可以看到从linq到sql以外的任何其他地方发送到服务器的sql.

I can see the sql sent to the server from anything except for linq to sql.

我敢打赌,我需要更改跟踪的事件选择,但不确定要选择什么.

I'm betting that I need to change event selections for the trace, but not sure what else to select.

我目前仅选择此选项: SQL:StmtCompleted-TextData& SPID

I am currently only selecting this: SQL:StmtCompleted - TextData & SPID

我既不想使用数据上下文日志记录,也不想使用SQL Debug Visualizer.我需要使用探查器.

I don't want to use data context logging nor the SQL Debug Visualizer. I need to use the profiler.

为什么我看不到LINQ to SQL查询?

Why can I not see the LINQ to SQL queries?

谢谢.

我添加了SQL:BatchCompleted,但没有帮助.

I added SQL:BatchCompleted and that hasn't helped.

我添加了事件RPC:Completed,该事件在事件选择的存储过程"类别下找到.这行得通!

I added the event RPC:Completed which is found under the Stored Procedures category in event selection. This worked!

推荐答案

您需要RPC调用-查询将作为exec_sql执行.

You need RPC call - the queries are executed as exec_sql.

这篇关于SQL Server Profiler不显示LINQ To SQL查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆