Can SQL Profiler display return result sets alongside the query?
Asked Answered
E

2

33

In SQL Profiler 2005, is it possible to capture a result set in a SQL trace, so that I could see corresponding queries with result sets? ...Or is it only a one way trace?

Thanks! George

Eductive answered 18/1, 2010 at 14:41 Comment(0)
U
19

No, you can't get the resultset produced by a query included in an SQL trace. You can only tell various statistics about the call (i.e. the query executed, duration, reads etc etc).

Output parameter values are recorded in the trace (if you parse TextData), and you can get it to include the rowcount info in the trace alongside the query. It just won't show you the actual resultset returned by the query.

Ungotten answered 18/1, 2010 at 14:50 Comment(0)
F
4

No, you can't.

But you can capture the SQL statement and parameter values (for parameterised queries) and run these manually in SQL Server Management Studio to obtain the resultset (on the assumption that the query does not modify any data obviously).

Fie answered 18/1, 2010 at 15:0 Comment(2)
The problem with this is, data can change between the time the query was run originally, and the time the user runs the query manually.Amaryl
@Amaryl Ward: you are stating the somewhat obvious. That's why the answer starts with "No, you can't."Fie

© 2022 - 2024 — McMap. All rights reserved.