SQL Profiler 能否在查询旁边显示返回结果集?
在 SQL Profiler 2005 中,是否可以捕获 SQL 跟踪中的结果集,以便我可以看到带有结果集的相应查询? ...或者这只是单向跟踪?
谢谢! 乔治
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,您无法获取 SQL 跟踪中包含的查询生成的结果集。您只能告诉有关调用的各种统计信息(即执行的查询、持续时间、读取次数等)。
输出参数值记录在跟踪中(如果您解析 TextData),并且您可以将其与查询一起包含在跟踪中的行计数信息。它只是不会向您显示查询返回的实际结果集。
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.
不,你不能。
但是您可以捕获 SQL 语句和参数值(对于参数化查询),并在 SQL Server Management Studio 中手动运行它们以获得结果集(假设查询明显不会修改任何数据)。
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).