【发布时间】:2010-10-13 01:42:00
【问题描述】:
试图通过发出“sp_reset_connection”来理解 Sql Profiler 的含义。
我有以下“exec sp_reset_connection”行,后跟 BatchStarting 和 Completed,
RPC:Completed exec sp_reset_connection
SQL:BatchStarting SELECT [c].[TestID] AS [TestID], [c].[Description] AS [Description] FROM [dbo].[Test] AS [c]
SQL:BatchCompleted SELECT [c].[TestID] AS [TestID], [c].[Description] AS [Description] FROM [dbo].[Test] AS [c]
基本上第一行“exec sp_reset_connection”是指整个过程(我的连接被打开,select stmt 运行,然后连接被关闭并释放回池)才发生?或者我的连接仍处于打开阶段。
而且,为什么 sp_reset_connection 在我自己的 select 语句之前执行,它不应该在用户的 sql 之后执行重置吗?
我想知道有没有办法更详细地了解连接何时打开和关闭?
看到“exec sp_reset_connection”,是否意味着我的连接已关闭?
【问题讨论】:
标签: sql-server database-connection sql-server-profiler sp-reset-connection