与IP地址的SQL Server实例名称 [英] SQL Server instance name with IP address

查看:284
本文介绍了与IP地址的SQL Server实例名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常奇怪的情况发生,我希望这里有人知道这是为什么。

I have a very strange situation happening and I'm hoping someone here knows why.

我已经启用在默认端口1433的所有端口的TCP / IP。

I have TCP/IP enabled for all ports on the default port 1433.

所有的测试都与SQL Server Management Studio中,我的计划是一致的。

All tests are consistent with SQL Server Management Studio and my program.

本作品:

  • 计算机名\实例
  • 127.0.0.1
  • 127.0.0.1,1433
  • 192.168.1.100
  • 192.168.1.100,1433

这不工作:

  • 127.0.0.1 \实例

注:我知道这是不是防火墙相关的,因为我可以telnet到127.0.0.1端口1433

Note: I know it's not firewall related because I can telnet into 127.0.0.1 on port 1433.

注2:连接字符串并不重要,因为测试是用Management Studio中一致的,但我给它反正:服务器= {0};集成安全性= TRUE;数据库= MyDatabase的

Note2: The connection string doesn't matter since the tests are consistent with Management Studio, but I'll give it anyway: server={0};Integrated Security=True;Database=MyDatabase

在阅读MSDN看来你应该能够通过一个IP地址连接到一个实例名称。

While reading MSDN it seems that you should be able to connect to an instance name via an IP address.

这是怎么回事吗?

推荐答案

命名 SQL实例监听一个随机端口默认情况下。您需要 SQL浏览器服务启动,这个监听UDP的1434和响应以实例发现请求指示客户端真正的监听端口。您还需要允许防火墙基于进程名称万佛洞,使SQL可以绑定在那感觉就像任何端口。

Named SQL instances listen on a random port by default. You need SQL Browser service started, this listens UDP on 1434 and responds to instance discovery requests instructing the client the true listening port. You also need to allow the firewall to poke holes based on process name, so that SQL can bind at any port it feels like.

否则,您必须明确强制非指定端口上的命名实例。

Otherwise you must explicitly force the named instance on the non-named port.

这篇关于与IP地址的SQL Server实例名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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