Home > Database > Mysql Tutorial > sql 2005不允许进行远程连接可能会导致此失败的解决方法

sql 2005不允许进行远程连接可能会导致此失败的解决方法

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-07 18:04:16
Original
1207 people have browsed it

用vs.net2005连接sql server 2005 出现以下错误:在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。

(provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接)

网站的数据库连接语句为:Server=127.0.0.1;uid=sa;pwd=xxx;database=xxx
经测试把server=127.0.0.1改为“server=.”或“server=机器名”,都可以正常连接;
所以只有在用IP时不能连接,经分析,解决方法如下:
1.打开Sql Server 2005 “配置工具” 中的“SQL Server 外围应用配置器”,点击“服务和连接的外围应用配置器”;
2.在出来的界面中点击“Database Engine”中的“远程连接”,把连接方式改为“本地连接和远程连接”中的“同时使用tcp/ip和name pipes”;
3.修改后通过“配置工具”中的“SQL Server Configuration Manager”重启Sql Server 2005服务;
注意:一定要重启Sql Server 2005服务修改才会生效;
Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
sql file
From 1970-01-01 08:00:00
0
0
0
php - Overhead of prepare vs sql?
From 1970-01-01 08:00:00
0
0
0
Print sql statement
From 1970-01-01 08:00:00
0
0
0
Pass array to SQL insert query using PHP
From 1970-01-01 08:00:00
0
0
0
sql optimization or
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template