• subscribe
May 26, 2004 12:00 AM

The sp_reset_connection Procedure

SQL Server Pro
InstantDoc ID #42592

SQL Server is executing a procedure, sp_reset_connection, that my code doesn't call. What is sp_reset_connection?

The sp_reset_connection procedure runs when the OLE DB (or ODBC) connection pool grabs a connection that's been released to the pool but is still active on SQL Server. The SQL Server connection, or server process ID (SPID), might still have connection information from a previous user. Thus, the sp_reset_connection procedure resets the connection so that it's clean for the next user. For example, temporary tables have scope as long as the SPID that created them is active. When the connection pool reuses that SPID, you don't want the new user to see an old temporary table that should be out of scope. This procedure is lightweight and doesn't cause performance problems. You'll see the procedure whenever a middle-tier box that's using connection pooling accesses SQL Server.



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here
  • SP1?
    I know there is a SP1 for SQL 2008 R2 available....and there is a "feature pack" as well... ...
  • SQL database mirroring
    I have SQL Server 2008 R2 Enterprise 64bit on Windows 2008 R2 Enterprise 64bit.  Each SQL Server has...
  • Dell Compellent Disk Drive
    Does anybody has experience with Dell Compellent Disk Drive? Basically, this system manages all disk...
  • Sql server performance tuning
    I need to find a tool that help me to optimize sql server,queries,improve the performance and solve ...