Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Here's what I'm working with right now. I have a host OS which includes a SQL Server 2008 Enterprise instance. I have a virtual machine running on this host which has a SQL Server 2008 R2 Express instance. In the virtual machine, I can connect to the host instance in SSMS. But in the host OS I cannot reach the virtual machine's Express instance.

What could be causing this? The host can ping the virtual machine, so I don't think it's a network issue. And in the SSCM on the virtual machine I have set the appropriate network protocols enabled.

2. Start SQL Server Browser

SQL Server Browser is used by some networking protocols to associate named instances with TCP/IP port numbers. However, if SQL Server Express is installed on the same computer as a pre-SP3 version of MSDE or SQL Server 2000, there might be conflicts. Also, the SQL Server Browser service does not start automatically after installation

3. Check your instance name

If you install SQL 2008 Express (or later versions), the Server instance will be named as SQLExpress, so to connect you will need to specify ServerName and InstanceName, ie:

[VMServer\SQLExpress]

4. Check Connection on SQL Server

In SSMS on Server right click Server, go to Connections and make sure that Allow remote connections to this server is checked

5. Basic network checks

Create a folder on your server, share it and make sure you can see it from the other machine.

Try to telnet to it

netstat -ab

Security
You might run into authentication issues, but that should be a straight forward matter of adding your user onto the SQL Server instance.

Note: If none of the above work for you, and you find the solution, please add your solution to the list above (trying to help future users as well)

What OS? If you are using Window Server 2008 or R2 have you set the firewall to allow connections?

Something I always try is go to a command prompt and type in "telnet 1433". It is a quick way to see if the port is open and listening for traffic to your instance. That is if you configured it to use this port. If you have it set to dynamic ports (meaning it is not set to static) you might check to see if Browser service is running.

I would also check the SQL ERRORLOG to make sure you see the messages that state "listening on...". That way you know it is in fact trying to listen to incoming calls.

A useful companion check for "telnet 1433" is "netstat -ab" on the machine your trying to connect to. This will list the ports the server is listening on, along with the binary involved.
–
Mark Storey-SmithAug 5 '11 at 12:58