连接到SQL 2005错误商.Net客户端连接到、客户端、错误、SQL

2023-09-03 07:35:17 作者:天黑路滑人心杂

我试图连接到数据库从开发机的服务器上。服务器已命名管道协议无效。出于某种原因,从一个开发者的盒子,我们得到了以下错误消息。其他两个开发商盒可连接使用相同的code就好了(使用TCP / IP)。我曾尝试禁用客户端上的命名管道协议,仍然收到以下消息。

I am trying to connect to a database on a server from a developer machine. The server has the named pipes protocol disabled. For some reason from one developer's box we get the following error message. Two other developer boxes can connect using the same code just fine (using tcp/ip). I have tried disabling The named pipes protocol on the client and still receive the following message.

客户端无法建立   因为过程中出现错误的连接   连接初始化过程   登录之前。可能的原因包括:   以下内容:在客户端试图   连接到不受支持的版本   SQL Server的;服务器太忙   接受新的连接;或有一个   资源限制(不足   内存或最大允许连接数)   在服务器上。 (provider:命名管道   提供程序,error:0 - 无的过程是   管的另一端。)

The client was unable to establish a connection because of an error during connection initialization process before login. Possible causes include the following: the client tried to connect to an unsupported version of SQL Server; the server was too busy to accept new connections; or there was a resource limitation (insufficient memory or maximum allowed connections) on the server. (provider: Named Pipes Provider, error: 0 - No process is on the other end of the pipe.)

连接字符串使用:

数据源= SERVER_NAME;数据库= DATABASE_NAME; trusted_connection = YES;连接超时= 120;

data source=SERVER_NAME;database=DATABASE_NAME;trusted_connection=yes;Connection Timeout=120;

感谢您的任何想法。

推荐答案

从Win98的客户端和ADO,我们用强制TCPIP的连接通过将此连接字符串:网络库= DBMSSOCN;

From Win98 clients and ADO, we used to force TCPIP on the connection by adding this to the connection string: Network Library=dbmssocn;

在XP中,你可以做同样的:网络库= TCPIP;

On XP, you can do the same with: Network Library=TCPIP;

不知道这是否仍然支持或ADO.Net连接鼓舞M $。

Not sure if this is still supported or encouraged by M$ for ADO.Net connections.