1

I have a web app that uses linq to pass queries to a SQL Server database. In my database I can run queries to see what was passed to the database and what time the queries were executed by timestamp. Unfortunately it does not show me the parameters that were passed by linq/the web app only the placeholders.

I cannot use visual studio because i only have the compiled web file, or am i able to open the dlls in visual studio??

Here is my query:

SELECT 
    deqs.last_execution_time AS [Time], dest.text AS [Query], dest.*
FROM 
    sys.dm_exec_query_stats AS deqs
CROSS APPLY 
    sys.dm_exec_sql_text(deqs.sql_handle) AS dest
-- WHERE dest.dbid = DB_ID('msdb')
ORDER BY 
    deqs.last_execution_time DESC

Here is a sample output:

SELECT {query body}
WHERE ([Date] >= @p__linq__0) AND ([Date] <= @p__linq__1)

Is there be a way to see the queries and the params from the sql side? I see a lot of answers on the web app side like this http://blogs.u2u.net/kris/post/2007/03/14/Sending-the-LINQ-To-SQL-log-to-the-debugger-output-window.aspx

but I have no experience with asp.net nor do I have the source code just the compiled web app.

Is there anything I can do?

SpaceTime
  • 31
  • 1
  • 5
  • I think these links can help: https://stackoverflow.com/questions/11002573/way-to-view-sql-executed-by-linq-in-visual-studio https://stackoverflow.com/questions/29345084/check-linq-query-against-sql-server-database – Renan Jul 20 '17 at 21:13
  • Possible duplicate of [Way to view SQL executed by LINQ in Visual Studio?](https://stackoverflow.com/questions/11002573/way-to-view-sql-executed-by-linq-in-visual-studio) – Renan Jul 20 '17 at 21:16
  • You can also use SQL Profiler – Jimbot Jul 21 '17 at 12:07

0 Answers0