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
January 11, 2016
![Q & A: How Can I Use the Shared Memory Protocol In My Client Connection? Q & A: How Can I Use the Shared Memory Protocol In My Client Connection?](https://eu-images.contentstack.com/v3/assets/blt07f68461ccd75245/blt0416ec21868b5aae/6618070d2a7c7b383f221843/qawebartred_0_2.jpg?width=1280&auto=webp&quality=95&format=jpg&disable=upscale)
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;
About the Author
You May Also Like