在MS SQL 2005中进行连接的远程连接字符串 [英] Remote Connection String to connect in MS SQL 2005

查看:78
本文介绍了在MS SQL 2005中进行连接的远程连接字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<?xml version="1.0" encoding="utf-8" ?>

<configuration>
  <configSections>
  </configSections>
  <appSettings>
    <!--   User application and configured property settings go here.-->
    <!--   Example: <add key="settingName" value="settingValue"/> -->
    <add key="SqlConnectionString" value="Data Source=MINTU\SQLEXPRESS\SQLEXPRESS;Initial Catalog=EmiInventory;Integrated Security=False;user=sa;password=database"/>

  </appSettings>

  <system.net>
    <mailSettings>
      <smtp deliveryMethod="PickupDirectoryFromIis">
        <network defaultCredentials="true" host="localhost" port="587"/>
      </smtp>
    </mailSettings>
  </system.net>
</configuration> 



这是我的配置文件.我通过LAN与PC连接,PC的名称为"MINTU",MS SQL Server 2005的名称为"MINTU \ SQLEXPRESS".因此,为什么我的连接字符串为:



This is my config file. I am connected with a PC by LAN and the name of the PC is ''MINTU'' and there is MS SQL Server 2005'' name is ''MINTU\SQLEXPRESS'' Thus why my connection string is :

<add key="SqlConnectionString" value="Data Source=MINTU\SQLEXPRESS\SQLEXPRESS;Initial Catalog=EmiInventory;Integrated Security=False;user=sa;password=database"/>



我收到错误消息:
建立与SQL Server的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.验证实例正确,并且将SQL Server配置为允许远程连接.

但是,我已经从SQL Server外围应用配置器在该PC上以及在我的PC中启用了远程和本地连接.因此,如果您有任何解决方案,请帮助我.
谢谢.



I am getting error:
A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance is correct and the SQL Server is configured to allow remote connections.

But, I have already enabled remote and local connection on that PC and in my PC from SQL Server Surface Area Configuration. So, please help me if you have any solution.
Thank you.

推荐答案

首先将SQL Server 2005配置为允许远程连接

配置SQL Server 2005以允许远程连接 [ http://www.sqlserverclub.com/essentialguides/how-to-configure-sql-server-2005-to-allow-remote-connections.aspx [
First configure SQL Server 2005 to allow remote connections

configure SQL Server 2005 to allow remote connections[^]

http://www.sqlserverclub.com/essentialguides/how-to-configure-sql-server-2005-to-allow-remote-connections.aspx[^]


<add key="SqlConnectionString" value="Data Source=MINTU\SQLEXPRESS\SQLEXPRESS;Initial Catalog=EmiInventory;Integrated Security=False;user=sa;password=database" />


更改您的连接字符串.您的数据源是错误的. MINTU \ SQLEXPRESS \ SQLEXPRESS删除此SQLEXPRESS之一并使用此


change your connectionstring. your datasource is wrong. MINTU\SQLEXPRESS\SQLEXPRESS reemove one of this SQLEXPRESS and use this

<add key="SqlConnectionString" value="Data Source=MINTU\SQLEXPRESS;Initial Catalog=EmiInventory;Integrated Security=False;user=sa;password=database" />


这篇关于在MS SQL 2005中进行连接的远程连接字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆