My colleague, Ashsih Patel, wrote up a nice walk-through describing how to see the CAML behind various SP queries that happen in the course of business in real-time using the ULS viewer.
Here’s the intro:
Did you ever want to know what CAML queries are executed by SharePoint Server?
Well, for troubleshooting and learning purpose, it is not a bad idea. After all, SQL Profiler has been helping us troubleshoot a lot of issues.
There may be products out there but I figured out a way to do it without spending extra bucks! And here it is…
You can read the whole thing here: http://www.bigapplesharepoint.com/pages/View-An-Insight.aspx?BlogID=68&rsource=pgblog&rtitle=caml.