views:

57

answers:

3

Hello, can anyone tell me how to view executed queries in SharePoint? I couldn't find a way to show query logs with SQL Server. As you know, SharePoint framework hides all queries from programmers. I would like to look into the queries and understand the mechanisms.

http://www.infoq.com/articles/SharePoint-Andreas-Grabner In above article, i can see some windows showing methods and arguments(Queries). But i could not figure out where this window come from...(looks like a window from visual studio) Does anyone know how to show this window? or any alternative way to display executed queries?

My working environment. Windows Server 2008 Enterprise MOSS 2007 SQL Server 2008 Enterprise Visual Studio 2008 with VSeWSS 1.2

Thank you in advance. Taiga

+4  A: 

SQL Server Profiling will let you log queries at a database level. You'd want to refine your trace to queries executed against the SharePoint database.

Tim Ridgely
Yes i just found it and looking in it..thank you.It seem very difficult to identify which code in C# calling which queries...Isn't it possible to see the queries from Visual Studio?
taiga
+1  A: 

You could use SQL Server Profiler and profile the server while running and accessing the sharepoint server. This will create a trace file/table that will allow you to see what queries were executed.

John Hartsock
thank you for your comment.I'm looking at it now.I still can't figure out where the article's windows come from.http://www.infoq.com/articles/SharePoint-Andreas-GrabnerDoes anyone know anything about it?
taiga
A: 

In the article itself they mention which profiling tool they use

http://www.dynatrace.com/en/application-performance-management-product.aspx

Ryan
oh thank you very much, i didn't notice it...
taiga