title: Is there a way to figure out what sql query is timing out with entity framework and the .NET Data Provider for SQL Server, from the application side?
body: <p>The subject line says most of it. We have a search screen on our entity framework web app that is timing out and giving "System.Data.SqlClient.SqlException: Execution Timeout Expired. " error, which I believe is not a sql server error but a .net provider front end error. I believe this is due to the sql query made upon searching timing out, probably due to bad code or parameter sniffing. This app has a lot of problematic code. However, the app team are saying it is essentially on me to figure out their problem, as I manage the database, and I'm trying to push back.</p>
  
  <p>My question is, is there anyway they could be debugging what the problem sql is on their end (the application side, not the database side)? Or could they only figure out what query is causing the problem with me doing some kind of trace looking at query executions that stop or something. </p>
  
  <p>I don't know enough about web apps or the entity framework to know how their logs or tracing abilities should be. But to me it makes sense that they would have a log of the sql statement they are executing against our database that is timing out for them, since it is their app that is creating the statement before running it against our database. If anyone knows how to do this and advise them, I would be really grateful. I would like to teach them how to fish in terms of identifying their problematic code because there is a LOT of it.</p>