Home  >  Article  >  Database  >  sqlserver如何从外网通过IP连接

sqlserver如何从外网通过IP连接

WBOY
WBOYOriginal
2016-06-07 16:19:461414browse

一台服务器上已经安装了sql server 2005,一切正常。最近由于要用到表类型参数,需要安装sqlserver 2008,可是装好后却连不上。本机通过机器名可以连上。 后来发现需要改一下端口。我不知到这是不是唯一的办法,希望高手指正。 打开ConfigurationManager,找

   一台服务器上已经安装了sql server 2005,一切正常。最近由于要用到表类型参数,需要安装sqlserver 2008,可是装好后却连不上。本机通过机器名可以连上。

  后来发现需要改一下端口。我不知到这是不是唯一的办法,希望高手指正。

  打开ConfigurationManager,找到TCP/IP,右击点属性,选择IPAddress到最后TCPAll, 把TCPPort改为你自己的port。

  然后在连接的时候需要加上port,,类似这样10.10.10.10sqlserver2008,1400,就可以连接成功了。连接字符串也要加上端口号。

  最后,注意把端口号添加到防火墙例外。

Statement:
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