Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make SQL Server running in Virtual PC accessible to host OS?

I'm running SQL Server 2008 Express on Windows XP on a VirtualPC instance inside a Windows XP host. I want to be able to connect to databases on the guest instance using SSMS on the host. When I go to connect from SSMS on the host, and browse for servers, I see the instance of SQL Server on the guest. Yet when I try to connect, using a SQL authentication login, I get the following connection error:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 28 - Server doesn't support requested protocol) (Microsoft SQL Server, Error: -1)

I have:
* tried connecting with both Name Pipes and TCP/IP
* ensured that the SQL Browser service is up
* ensured that the firewall on the guest is open
* the server is configured to allow remote connections (according to the database engine properties within SSMS on the guest)

What am I missing?

EDIT: I figured this out. My resolution is below.

like image 643
David Korn Avatar asked Nov 21 '08 22:11

David Korn


People also ask

Can SQL Server run on a virtual machine?

SQL Server on Azure Virtual Machines enables you to use full versions of SQL Server in the cloud without having to manage any on-premises hardware. SQL Server virtual machines (VMs) also simplify licensing costs when you pay as you go. Azure virtual machines run in many different geographic regions around the world.

How do I connect to a SQL Server virtual machine?

First, connect to the SQL Server virtual machine with remote desktop. After the Azure virtual machine is created and running, click the Virtual Machines icon in the Azure portal to view your VMs. Click the ellipsis, ..., for your new VM. Click Connect.


2 Answers

SELF-ACCEPTED ANSWER

Thanks for the ideas. After much fiddling I got things working. It turned out that I had not gone into the Sql Server Configuration Manager and enabled TCP/IP and Named Pipes as network protocols. So even though SSMS said remote connections were enabled, there was no protocol to allow for them other than shared memory. After I did this I restarted the SQL Server service, but things still didn't seem to work properly. Yet once I had rebooted both the guest and host, everything was working as expected.

like image 165
David Korn Avatar answered Nov 09 '22 19:11

David Korn


How are your IP settings? Are you sharing the same IP address between the two machines? If so, then perhaps when your clients attempt to connect to 10.1.1.10, it is hitting the IP of the machine hosting the VPC instance, and that machine is not running the SQL Server instance. If possible, have VPC get its own IP and try that.

like image 35
Nick DeVore Avatar answered Nov 09 '22 18:11

Nick DeVore