Difference between Session and Connection in SQL Server -


in case of temporary tables,we see connection dependent,i mean tables created in 1 connection available connection , automatically dropped when connection lost or destroyed.

what difference between connection , session in sql server?

literally : connection physical communication channel , session state of information exchange. connection may have multiple sessions.

the connection physical communication channel between sql server , application: tcp socket, named pipe, shared memory region. session in sql server corresponds wikipedia definition of session: semi-permanent container of state information exchange. in other words sessions stores settings cache of login information, current transaction isolation level, session level set values etc etc.

normally there 1 session on each connection, there multiple session on single connection (multiple active result sets, mars) , there sessions have no connection (ssb activated procedures, system sessions). there connections w/o sessions, namely connections used non-tds purposes, database mirroring sys.dm_db_mirroring_connections or service broker connections sys.dm_broker_connections.

i got reference here


Comments

Popular posts from this blog

amazon web services - S3 Pre-signed POST validate file type? -

c# - Check Keyboard Input Winforms -