zoukankan      html  css  js  c++  java
  • 【sql2000数据库】Named Pipes Provider error 40

    问题描述: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)

    解决方案:如果网络,数据库没问题,用winform也可以连接,那么有可能的一个原因就是Sqlserver2000没有打Sp4补丁。可以使用如下sql命令查看:

    select serverproperty('productlevel')

    安装sp4补丁就很简单了一路下一步,不过这里有个小问题有的时候在安装sp4的时候无法使用Sql账户而要用windows本地账户。所以在安装sp4后数据库就无法进入了。下面说说解决方法。

    1.如果在企业管理器中因账户问题而不能打开数据库那就把它删掉以windows本地账户重新注册一个。

    2.选择数据库实例 ->属性-> 安全性标签 -> 勾选SQL Server 和 Windows

    3.选择数据库实例 -> 编辑SQL Server注册属性 ->选择使用SQL Server身份验证输入登录名和密码。

    完成以上步骤就又可以使用Sqlserver的帐户登陆了

  • 相关阅读:
    MySQL之数据库优化
    cookie和session
    php自动加载
    php函数之strtr和str_replace的区别
    php函数之substr()
    阶段总结(一)
    json和xml
    sqlserver交换数据行中的指定列
    3 宏、条件编译
    5 常量与变量
  • 原文地址:https://www.cnblogs.com/chenbg2001/p/1885865.html
Copyright © 2011-2022 走看看