存储过程通过基本的Winterms上的遗留VB6应用程序的4.0上的ASP.NET页面进行访问.
> exec sp_reset_connection(使用连接池)
>审核登录
>执行存储过程
>审核注销
我在步骤4中看到,读取和写入的方式很高,这是有道理的,因为它是在池中重用的连接的累积.
我关心的是多长时间,有时候需要50ms,其他时间400ms,完全是随机的.从文档中我看到“审计注销”是整个三个步骤的持续时间.但是步骤1-3非常快,像0-5ms.为什么“审计登出”的持续时间要长呢?
解决方法
帖子: http://social.msdn.microsoft.com/Forums/en/sqldatabaseengine/thread/84ecfe9e-ff0e-4fc5-962b-cffdcbc619ee
也许这个(上面提到的帖子)是解决方案:
“One error in my analysis has been identified. When a connection is pulled out of the pool,the server is sent a sp_reset_connection. That reset invokes an audit_@R_403_395@ut followed by an audit_login. The next audit_@R_403_395@ut doesn’t occur until the next time the connection is pulled out of the pool… so the long intervals I am seeing include the time the application processes the results of a query,releases the connection to the connection pool,does whatever,and finally pulls the connection back out of the pool to start the next transaction.”