How to force the protocol(NamedPipe or TCP/IP) connection when connect locally on Server ?

 Posted by PandianS on 5/28/2011 | Category: Sql Server Interview questions | Views: 5291 | Points: 40

Normally, when we try to connect the Server from locally, It will connect with Shared Memory protocol.

If the Server Name : SQLFunda
If the Instance Name : SQLBuddy

But, we can force the connection either Named Pipe or TCP/IP

Forcing TCP/IP:
i.e: tcp:SQLFunda\SQLBuddy

Forcing NamedPipe:
i.e: np:SQLFunda\SQLBuddy

Once connected. we can verify that what kind of connection made ?
select s.session_id [Session ID], 

e.Name [Protocol Used]
from sys.dm_exec_sessions s join sys.endpoints e
on (s.endpoint_id = e.endpoint_id)

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Posted by: Chvrsri on: 5/30/2011 | Points: 10
Hi PandianS,

Nice Post , It helped me !!!

Login to post response