从 VMWare 机器访问主机 SQL Server [英] Accessing Host SQL Server From VMWare Machines

查看:48
本文介绍了从 VMWare 机器访问主机 SQL Server的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有带有 SQL Server 2008 和 SQL Express 2012 的 Windows 7.我还在两台 vmware 机器上安装了 win xp.我正在尽力使用管理工作室从 vm 机器连接到主机上的 sql server,但没有运气.我什至无法 ping 主机,反之亦然.当我关闭防火墙时,我能够 ping 主机.我尝试添加 vm 机器的 IP 以允许访问主机,但即使这样也不起作用.

I have Windows 7 with SQL Server 2008 and SQL Express 2012 on it. I have also installed win xp on two vmware machines. I am trying my best to connect to sql server on host machine from the vm machines using management studio, but no luck. I had problem even pinging the host machine and visa versa. When I turned off the firewall, I was able to ping the host machine. I tried to add the vm machine's IP to allow access to host machine, but even that didnt work.

我从这里添加了一个自定义规则http://www.rackspace.com/knowledge_center/article/creating-an-inbound-custom-allow-rule-for-windows-firewall-windows-2008

I have added a custom rule from here http://www.rackspace.com/knowledge_center/article/creating-an-inbound-custom-allow-rule-for-windows-firewall-windows-2008

我正在运行我关闭的热点屏蔽,但仍然没有运气.我已允许在我的 sql 服务器上进行远程连接.但仍然无法正常工作.有人可以在这里帮忙.

I was running hotspot shield which i turned off, but still no luck. I have allowed remote connection on my sql server. but still not working. Can someone help here.

这是我得到的错误.

这里是 vm 机器的设置.

Here is the setting for vm machine.

防火墙开启时不能ping通,关闭时可以ping通.

When the firewall is on, cant ping, but can ping when its off.

问候

Parminder

推荐答案

您需要配置 SQL Server 以侦听 TCP 协议.为此,请单击开始 |所有程序 |Microsoft SQL Server 2012 |配置工具并打开 SQL Server 配置管理器.

You need to configure SQL Server to listen on the TCP protocol. To do this, click Start | All Programs | Microsoft SQL Server 2012 | Configuration Tools and open SQL Server Configuration Manager.

  1. 在 SQL Server 配置管理器中,展开 SQL Server 网络控制台窗格中的配置.
  2. 单击协议以获取实例名称.(默认实例是MSSQLSERVER 协议).
  3. 在详细信息窗格中,右键单击 TCP,它应该为画廊图片默认.对于您的自定义图像,单击启用(如果其状态为禁用.)
  4. 右键单击 TCP/IP 并选择属性.
  5. 验证在 IP2 下,IP 地址是否设置为计算机的 IP本地子网上的地址.
  6. 确保 TCP 动态端口为空.
  7. 确保 TCP 端口设置为 1433.
  8. 在详细信息窗格中,右键单击 SQL Server(实例名称)(默认实例为 SQL Server (MSSQLSERVER),然后单击重启,停止并重启 SQL Server 实例.

然后,您需要在 Windows 防火墙中为数据库引擎的默认实例打开 TCP 端口.为此,请单击开始 |所有程序 |管理工具,然后打开具有高级安全性的 Windows 防火墙.

Then, you need to open TCP ports in the Windows firewall for the default instance of the Database Engine. To do this, click Start | All Programs | Administrative Tools, and open Windows Firewall with Advanced Security.

  1. 在高级安全 Windows 防火墙的左窗格中,右键单击入站规则,然后在操作中单击新建规则窗格.
  2. 在规则类型"对话框中,选择端口",然后单击下一步"
  3. 在协议和端口对话框中,选择 TCP.选择特定本地端口,然后键入实例的端口号数据库引擎(默认实例为 1433).点击下一步.
  4. 在操作"对话框中,选择允许连接",然后选择点击下一步.
  5. 在配置文件对话框中,选择域、私有、公共,然后点击下一步.
  6. 在名称页面中,将入站规则的名称设置为 SQLServerPort 并单击完成.关闭高级安全 Windows 防火墙窗口.

希望对您有所帮助.最好的问候

Hope this help. Best Regards

这篇关于从 VMWare 机器访问主机 SQL Server的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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