What is the relationship between a SPID and a Connection in SQL server?

谁说我不能喝 提交于 2019-12-07 05:51:19

问题


Can a SPID be used by two connections, while both connections are open?

If a connection is returned to a connection pool, will it hold on to the SPID?


回答1:


Can a SPID be used by two connections, while both connections are open?

No, each open connection will have its own SPID.

If a connection is returned to a connection pool, will it hold on to the SPID?

Yes, as long as the connection is open, it will be associated with one SPID.

You can test this yourself by querying sys.sysprocesses. Rebooting a client machine should clear its connection pool.



来源:https://stackoverflow.com/questions/2742693/what-is-the-relationship-between-a-spid-and-a-connection-in-sql-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!