Link to home
Create AccountLog in
Avatar of ByronJ
ByronJ

asked on

Can't connect to SQL Server 2005 on Virtual PC 2007 guest

I am running Windows 7 Ultimate with Virtual PC 2007 installed.  I also have Visual Studio 2008/2010 installed, and Norton Internet Security 2011.  

I setup Windows XP SP3 on a virtual machine (with a static IP) and installed SQL Server 2005 Developer.  I turned off Windows Firewall on the guest.  I can ping the guest VM from the host and vice-versa.  The guest can browser the internet.  I can access the guest via VNC as well.

I cannot connect to SQL Server on the guest via ODBC from the host.  I have used both the SQL Native Client and  SQL server drivers.  With SQL Native Client I get the errors:

Connection Failed"
SQL State: '08001'
SQL Server Error: 10061
.... No connection could be made becuase the target machine actively refused it.

Connection Failed:
SQL State: 'HYT00'
SQL Server Error: 0
... Login timeout expired

Connection Failed:
SQL State: '08001'
SQL Server Error: 10061
...  An error has ocurred while establishing a connection to the server.  When connection to SQL server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.


In SQL Server I allowed remote connections and enabled TCP/IP and Named Pipes.  I also turned off everything in Norton but still no luck.  

Need an answer or guidance about how to debug the problem to get more info to get an answer.
Avatar of tigin44
tigin44
Flag of Türkiye image

did you check the firewall settings on the guest? You should disable or set an exception rule for the sql server related ports...
Avatar of arnold
Make sure that you enabled TCP/IP under the microsoft sql configuration tool.
Avatar of ByronJ
ByronJ

ASKER

tiqin44: I turned off the firewall on the guest

arnold: I enabled TCP/IP and named pipes using the SQl config tool

Are there some low level tools that I can use on the host to diagnose where things are breaking down?  I enabled logging in ODBC but it didn't show anything.  There is nothing in the Event Logs either when the connection fails.
When you connect to the sql server locally using SSMS, check the properties of the server to see whether it is configured to use windows authentication or mixed mode.
can you: telnet <mssqlservername> 1433?

you need to look at the firewall on the virtual PC, also check what IP does the virtual PC system has, make sure it is on the LAN as is the other system.
ASKER CERTIFIED SOLUTION
Avatar of ByronJ
ByronJ

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
For Host to access resource of the guest, the Guest IP must not be NAT but it should be bridged to the host such that both systems will have an IP on the same LAN.
Avatar of ByronJ

ASKER

I need to move on and found a workaround.