|
Posted by Robert Klemme on 03/05/07 11:11
On 05.03.2007 11:31, Dylan Parry wrote:
> I am trying to debug some queries that are being generated by an
> external program, and I have no way of finding out what the actual
> syntax of the query is from within the program itself. This means that
> when the query fails I am left with only a very unhelpful message.
>
> So what I was wondering, was whether there is a way that I can view the
> actual queries that are sent to SQL server as they happen, or if a
> real-time solution doesn't exist, then some way I can look back after
> the event and see the syntax of the queries?
>
> Ideally, what I would like to do is see the queries in the form they
> were sent to the server, ie "SELECT * FROM foo WHERE bar='foobar'", as
> this would help me to figure out where the generated queries are going
> wrong.
SQL Profiler is your friend - for online as well as offline
investigation. You can even have it include execution plans and timings.
Kind regards
robert
F'Up comp.databases.ms-sqlserver
Navigation:
[Reply to this message]
|