SPID和SQL Server中的连接之间有什么关系? [英] What is the relationship between a SPID and a Connection in SQL server?
问题描述
两个连接都打开时,两个连接都可以使用SPID吗?
Can a SPID be used by two connections, while both connections are open?
如果将连接返回到连接池,它将保留在SPID上吗? ?
If a connection is returned to a connection pool, will it hold on to the SPID?
推荐答案
两个连接都可以使用SPID,而两个连接都可以使用
Can a SPID be used by two connections, while both connections are open?
否,每个打开的连接都有其自己的SPID。
No, each open connection will have its own SPID.
如果将连接返回到
连接池,它将保留
的SPID吗?
If a connection is returned to a connection pool, will it hold on to the SPID?
是的,只要连接打开,它将与一个SPID关联。
Yes, as long as the connection is open, it will be associated with one SPID.
您可以通过查询<$ c来自己进行测试$ c> sys.sysprocesses 。重新启动客户端计算机应清除其连接池。
You can test this yourself by querying sys.sysprocesses
. Rebooting a client machine should clear its connection pool.
这篇关于SPID和SQL Server中的连接之间有什么关系?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!