Monday, February 23, 2009

A transport-level error has occurred when sending the request to the server

This post's purpose is to explain the above connectivity error and ways of resolving it.

In some cases (upon "wrong" actions or network problems :) we might get the following error in SQL Server:

A transport-level error has occurred when sending the request to the server. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.)

As the error message indicates, there is a connectivity problem with a previously opened session in SQL Server.

As an example, consider that you have a query window opened. This query window is connected to a database (the default database is "master"). To this end, there is an established connection to that database, that is a session. At a lower level in SQL Server, there is an spid representing this session.

If this spid is forcibly terminated (i.e. by using the SQL Server KILL function, or after an unexpected network problem) and though you are still trying to use this session (i.e. execute a query) you will most probably get the above connectivity error.

A solution in this case, is to close the query window and open a new one. To this end a new session will be opened and will be assigned a new spid. After that, you will be able to use the database properly.

The above connectivity error might arise not only when using the query window, but other SQL Server services that might access SQL Server objects as well. It is a general connectivity error and the best solution for resolving it is to start a new session in order for the connectivity to the specific SQL Server object(s) to be restored/re-initiated.


--
My Latest Projects:


[Ads]
Check out my latest eBook on SQL Server:
Tuning SQL Server - Ebook

Easily secure your SQL Server instances! Try out DBA Security Advisor!
DBA Security Advisor for SQL Server by SQLArtBits
DBA Security Advisor was developed by SQLArtBits. The tool was being carefully developed for an entire year and it contains comprehensive security checks and recommendations based on proven SQL Server security best practices. Feel free to download and use the Community Edition which is free and if you find it useful, you can consider upgrading to the Enterprise Edition!

Artemakis Artemiou [MVP]

Author & Editor

Artemakis Artemiou is a Senior SQL Server Architect, Software Developer and Microsoft Data Platform MVP. He is also an author, regular blogger, president of Cyprus.NET User Group and CY Country leader of INETA-EU. He is also the creator of DBA Security Advisor and In-Memory OLTP Simulator. Artemakis is a frequent guest author of worldwide well-respected online journals where he writes articles focusing on many SQL Server topics.

Reference: The SQL Server and .NET Hub (http://www.sqlnethub.com)

1 comments:

Thomas Gagne said...

Our application has 12 clients posting transactions to the DB. In the middle of an otherwise eventless run, multiple of the clients will begin getting the transport-level error.

This error suggests a fairly fragile network library for SqlServer.

Curiously, without closing and opening a new connection the transactions eventually start working again.

I've been Googling around looking to see if Microsoft is aware of this problem and if there's any official recommendation or patch.

Of course, other times it works without a hiccup.