配置SQL Server出现错误。如果你帮我解决,我愿意给QQ币。

来源:百度知道 编辑:UC知道 时间:2024/05/12 04:32:25
我打开命令窗口,在C;\Windows\Microsoft.NET\Framework\v2.0.50727目录下运行aspnet_regsql 选择Windows authentication后按要求填好,最后总是出现错误,选择SQL Server authentication时也一样。我用Microsoft SQL Server Management Studio Express以上面两种方式都可以连接数据库。我的QQ:459281182
错误信息:
Setup failed.

Exception:
Unable to connect to SQL Server database.

----------------------------------------
Details of failure
----------------------------------------

System.Web.HttpException: Unable to connect to SQL Server database. ---> System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakCon

去安装企业版

一看就应该是装的SQL Server2005吧
很多人都遇上这个问题,特将方法解释如下:
SQL Server2005的安全性,默认仅限于本地连接,并没有打开远程连接;
打开远程连接方法:
开始->所有程序->MS SQL Server2005->配置工具->MS SQL Server2005外围应用配置器->服务器和连接的外围应用配置器->
Database Engine下远程连接选择"本地连接和远程连接"中同时使用"TCP/IP和name pipes"
Analysis Services下远程连接选择"本地连接和远程连接"
应用后重启数据库

是SQL服务没有开吧?你看下任务管理器里面,有没有进程叫sqlserver的

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

可能一,sqlserver的服务没有开启
可能二,服务密码有改过

你用什么配置的?你用“Reporting Services 配置”试试