(jw*****@gmail.com) writes:
Not the results of queries, but the acutal command that is executed to
retrieve the results. Isn't that what profiler does, displays all
commands that are being executed on the sql server.
Ah, I read "query analyzer", not "query profiler".
Profiler is an interface to a server side thing called SQL Trace.
The interface of SQL Trace is a bunch of stored procedure called
sp_trace_create etc. In fact, you can set up a trace with these
procedure, and have it running without using Profiler. I have never
tried this myself.
As for the question:
Is it the command that is retrieved before it is processed, or is
it what is actually processed.
Rather both. You can select the events SP:StmtStarting and
SP:StmtCompleted, so you will see both when the statement started
and when it completed - if it completed. There is not always an even
if the statement aborts in error.
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp