Getting the actual SQL Query during runtime

Posts   
 
    
gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 09-Aug-2016 20:00:42   

Hi,

For debugging and comparison purposes our users would like to validate some of the Linq queries (which we dynamically generated based on their input in the UI) again the SQL server manually. Now we use SQL Monitor / Profiler for this purpose but that's quite cumbersome. Is there a way to get the actual queries during runtime using code so we can output them with the results to (in our case) the output file.

Thanks.

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 09-Aug-2016 21:56:25   

Enable (configure) tracing, and use a trace listener.

Please check this thread for more details. http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=21424

(please reply back here).

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39613
Joined: 17-Aug-2003
gabrielk avatar
gabrielk
User
Posts: 231
Joined: 01-Feb-2005
# Posted on: 10-Aug-2016 18:58:42   

Thanks! Got the data that I needed with that information.