.Net client connecting to SQL 2005 with wrong provider

匿名 (未验证) 提交于 2019-12-03 02:33:02

问题:

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.

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.)

The connection string being used:

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

Thanks for any ideas.

回答1:

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

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

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



回答2:

You can try to run the command "CliConfg.exe" and set the default protocol to "TCP/IP"



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!