连接到在并行VM中运行的SQLServer [英] Connect to SQLServer running in a parallels VM

查看:170
本文介绍了连接到在并行VM中运行的SQLServer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过OSX上的Parallels运行Windows 7 VM.该VM上有一个运行的SQL Server实例.我非常希望能够从主机(OSX)连接到该实例.我希望能够将本地RoR环境与SQLServer用作后端.

I'm running a Windows 7 VM via Parallels on OSX. There's an instance of SQL Server running on that VM. I would very much like to be able to connect to that instance from my host (OSX). I want to be able to leverage my local RoR environment with SQLServer as a backend.

我无法让VM响应来自Mac的任何请求,也不知道从何处开始故障排除过程.

I can't get the VM to respond to any requests from my Mac and I haven't a clue where to begin the troubleshooting process.

任何人都可以提供任何见解或有用的资源吗?

Can anyone provide any insights or helpful resources?

TIA!

推荐答案

Bobby,如果要从Mac OS X连接到并行vm上安装的sql服务器,则需要做3件事:

Bobby, if you want to connect from your mac osx to a sql server installed on a parallels vm you need to do 3 things:

1)在您的sql服务器上启用远程连接.

1) Enable remote connections on your sql server.

Microsoft SQL Server 2005->配置工具-> SQL Server外围应用配置->服务和连接的外围应用配置->数据库引擎->远程连接->本地和远程连接->启用TCP/IP->应用

Microsoft SQL Server 2005 -> Configuration Tools -> SQL Server Surface Area Configuration -> Surface Area Configuration for Services and Connections -> Database Engine -> Remote Connections -> Local and remote connections -> Enable TCP/IP -> Apply

2)打开SQL Server Browser服务(SQL Server Express和dev Edition默认情况下将其关闭) Microsoft SQL Server 2005->配置工具-> SQL Server配置管理器->启动SQL Server浏览器服务

2) Turn on the SQL Server Browser service (sql server express and dev edition turn this off by default) Microsoft SQL Server 2005 -> Configuration Tools -> SQL Server Configuration Manager -> Start SQL Server Browser service

3)配置防火墙以允许网络流量

3) Configure the firewall to allow network traffic

您可以按程序配置它,或者我只是在防火墙例外中打开了一个端口(SQL Server 2005默认为1433)

You can configure it per program or I just opened a port in firewall exceptions (1433 by default for SQL Server 2005)

例如,我的jTDS连接字符串如下所示:

For instance my jTDS connection string looks like that:

jdbc:jtds:sqlserver://10.211.55.7:1433;DatabaseName=master

(主机当然是您的虚拟机的IP)

(where the host is your vm's ip of course)

这篇关于连接到在并行VM中运行的SQLServer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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