Q & A: How Can I Use the Shared Memory Protocol In My Client Connection?

See how to make your client connection use the Shared Memory protocol

Michael Otey

January 11, 2016

1 Min Read
Q & A: How Can I Use the Shared Memory Protocol In My Client Connection?

Q: How can I make sure that a client connection on my database development system is using the Shared Memory protocol?

A: The Shared Memory protocol does not require any configuration and it provides a very high speed connection but it can only be used when you are connecting to a SQL Server instance that’s running on the same computer as the client. To make the client connection using the Shared Memory Protocol first the protocol must be enabled on the client. You can check the status of the enabled protocols using SQL Server Configuration Manager. Next, in your connection string you can use (local) as the server name to force the client connection to use the Shared Memory protocol. You can also use localhost or a period (.). You can see an example connection string below.

Server=(local);Database=AdventureWorks;Trusted_Connection=True;

The following query will show which protocol your client connection is using.

SELECT net_transport FROM sys.dm_exec_connections WHERE session_id = @@SPID;

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like