views:

124

answers:

1

Hello everyone,

I am using VSTS 2008 + C# + ADO.Net + SQL Server 2008. When connecting from another remote machine, normally TCP/IP protocol is used by ADO.Net client to connect to SQL Server 2008. When connecting locally (ADO.Net client and SQL Server on the same machine), normally shared memory or named pipe is used.

My question is, besides the general rules, how to check exactly (e.g. from some SQL Server built-in commands/tools/store procedures?) what communication protocol is used by a specific connection?

thanks in advance, George

+3  A: 

This is new to me, but you could try using the dynamic management views:

SELECT *
FROM sys.dm_exec_connections dec

gives a lot of information about connections.

HTH, Stu

Stuart Ainsworth
I execute this command, but find no protocol related information. Here is the output I got.
George2
51 51 2009-10-22 19:42:00.407 Shared memory TSQL 1930035203 2 FALSE NTLM 0 14 14 2009-10-22 19:42:05.737 2009-10-22 19:42:05.737 4096 <local machine> NULL NULL NULL BABB0392-297D-4250-9B0B-C04F22D56DEA NULL 0x010001005CC84C1AC08F0F8000000000000000000000000052 52 2009-10-22 19:42:14.407 Shared memory TSQL 1930035203 2 FALSE NTLM 0 11 10 2009-10-22 19:43:32.147 2009-10-22 19:43:08.560 4096 <local machine> NULL NULL NULL 1218E269-B868-434F-9F7C-E5C951CFE4BB NULL 0x0200000033B9372C31D6C32AA10D396B4B27AF68A875D864
George2
the net_transport column identifies which protocol is being used by what connection; for example, you have two Shared Memory connections in your sample above. Did I misunderstand your question?
Stuart Ainsworth
Thanks Stuart, are there any descirption (document) about the meaning of column net_transport? I did not find such information from MSDN.
George2
Other than what is in Books Online, no; it's just simply a column that identifies what protocol is being used by what connection.
Stuart Ainsworth
Thanks Stuart, question answered!
George2