A transport-level error occurred while sending the request to the server. (Provider: Shared Memory provider, error:0-there is no process on either end of the pipeline.

Source: Internet
Author: User
Tags connection pooling

Ching

Original address: http://blog.csdn.net/qingdujun/article/details/36425825


SQL Server + VS2010 code written in C #, error in database restore:

Error content:

A transport-level error occurred while sending the request to the server.

(Provider: Shared Memory provider, error:0-there is no process on either end of the pipeline.

Workaround:

Construct a SQL link statement such as the following:

String strlink = @ "server=.; Database=databasename;uid=sa;pwd=123456;pooling=false ";
The front is still the same, just add a pooling=false in the back, not use the connection pool.



————————————————————————————————————————

Analysis Description:

In fact, we've been using SQL Server's connection pool. In the connection string, pooling is enabled for connection pooling, and the default value is true. Indicates enabled.




The two important parameters related to connection pooling are min pool size and max pool size, each of which is the minimum number of connections in the pool and the maximum number of connections in the pool, with the default values of 0 and 100 respectively.


When we create an instance of a connection and call the open () method, the connection pooling manager finds an available connection in the connection pool. When the close () method is called, the connection pool manager also returns the connection to the connection pool for use by the next call to the open () method.


Other than that. The Connection Lifetime in the connection string sets the life cycle for the connection in the connection pool. Its default value is 0. When a connection is returned to the pool, its creation time is compared to the current time, assuming that the length of time (in seconds) exceeds the value specified by Connection Lifetime. The connection will be destroyed. This is very useful in a clustered configuration (used to enforce load balancing between servers in execution and servers that have just been put online). A value of 0 (0) causes the connection pool to have the maximum connection timeout.


Through the above understanding. We can see that even the simplest connection string is using a connection pool.



References: Baidu knows. A transport-level error occurred while sending the request to the server. (Provider: Shared Memory provider, error:0-there is nothing [cp/ol] on one end of the pipeline. Http://zhidao.baidu.com/question/1573456795577498260.html. 2013-09-27/2014-07-02.

Qi Fei ' s blog.sql Server connection pool and how it is used [Cp/ol]. Http://www.cnblogs.com/youring2/archive/2011/06/18/2084442.html. 2011-06-18/2014-07-02.


A transport-level error occurred while sending the request to the server. (Provider: Shared Memory provider, error:0-there is no process on either end of the pipeline.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.