Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
442 views
in Technique[技术] by (71.8m points)

sql server - Connect to SQLServer running in a parallels VM

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.

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!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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) Enable remote connections on your sql server.

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) 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) Configure the firewall to allow network traffic

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

For instance my jTDS connection string looks like that:

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...