The forum will be down for maintenance over the weekend of August 18-20, 2017. The forum will be shut down on the evening (EDT) of Friday, August 18. Downtime is unknown but may be up to two days. The forum will be restarted as soon as maintenance is complete.

Having found this invaluable source of people who actually answer questions, I thought I would make the most of it and ask something that has been bugging me for a while:

Is there an equivalent of the MS SQL Server profiler, or some behind the scenes method which can allow me to view what SQL statements are being executed on a particular connection?

The reason I ask is because I would like to explore the (in)efficiency of various Entity Framework queries from code, which it is impossible to view otherwise, and to see quite how awful the SQL statements generated are in the case of complex relationships and Include statements.

Thanks

asked 26 Nov '10, 18:02

Adam%20King's gravatar image

Adam King
2255513
accept rate: 0%

6

When you said, "Having found this invaluable source of people who actually answer questions..." you just MADE THE DAY for alot of people who love this resource!

(26 Nov '10, 19:00) Bill Aumen

I am sure there are many different answers to your question; but if all you want to do is view the SQL being executed on the server without any real analysis, then I would suggest using the request level logging feature built into SA. Have a look at the request logging section in the documentation.

If, however, you want to perform some advanced analysis (ex. application profiling), then there are other tools within SA that you can use. See the section on monitoring and improving database performance within the documentation.

HTH

permanent link

answered 26 Nov '10, 18:56

Karim%20Khamis's gravatar image

Karim Khamis
5.6k53870
accept rate: 40%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×65

question asked: 26 Nov '10, 18:02

question was seen: 1,134 times

last updated: 26 Nov '10, 18:56