Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have SQL Server 2005 Express Edition installed on my Windows 7 host machine, and I would like to be able to access that from a Windows XP Virtual PC.

This way, I can develop using Delphi 7 on XP alongside Visual Studio projects on Windows 7 which both use the same data.

EDIT: At this point I have only installed the Windows XP Virtual PC and Delphi 7 within it. I cannot ping the host machine and all the host drives are mounted using:

//tsclient/share/

So my question is - How do I see the host machine's SQL 2005 Server from a Windows XP Virtual PC?

share|improve this question
    
Can you update this question to include what version of SQL Server you are using? –  Wayne Jul 13 '09 at 4:23
    
Delete previous comment, read your comment further down –  Wayne Jul 13 '09 at 4:23

3 Answers 3

Go to Start->Control Panel->Administrative Tools->Services and ensure that the SQL Server Browser service has been started and set to automatic.

Use the SQL Surface Configuration Manager->Services & Connections. Expand Database Engine, click Remote Connections and ensure Local & Remote connections selected and you have TCP/IP selected (you can use named pipes & tcp/ip)

Now to ensure is not a firewall issue, disable the firewall on your windows 7 host and now try to connect from your virtual XP machine (also disable the firewall within this VM environment as well).

Update: Ok, so you have enabled SQL Browser service, enabled TCP/IP sockets and can connect by IP address\SQLEXPRESS. Sorry for making you possibly feel stupid but you did try WIN7MACHINENAME\SQLEXPRESS yes? Can you make a share on the Win7 machine and try to access that share from xp via \\WIN7MACHINENAME\SHARENAME and tell us the error. You may also want to update your top comment to reflect what you have done to get things working till this point. Can you also try without using a RDP session but using the raw VM console?

share|improve this answer
    
This only addressed the remote connections to the SQL server. I still can't access the host machine by hostname for example. –  Simon Hartcher Jul 13 '09 at 3:57
    
Ok, now we are getting either a DNS issue or a NETBIOS issue. Try using the IP address of the Windows 7 machine and see if that is able to connect. –  Wayne Jul 13 '09 at 4:22
1  
Can you try xxx.xxx.xxx.xxx\SQLExpress and see if that works? –  Wayne Jul 13 '09 at 4:24
    
By IP worked. So now how do we get it working by hostname? It is on a laptop so the IP will change. –  Simon Hartcher Jul 13 '09 at 5:01
    
Ok, have you disabled the firewall on both machines? This just ensures that is not the problem. If you have disabled that can you verify in the XP machine that ping <win7_machinename> works? –  Wayne Jul 13 '09 at 11:12

You'll have to ensure the SQLSever and SQLBrowser executables are allowed through Windows 7's Windows Firewall.

Try this on your Win 7 machine:

  • Start->Run-> firewall.cpl
  • Allow a program through Windows Firewall
  • Click button "Add Program", and Browse
  • Add these two executables: (assuming SQL Server Express on these filepaths, but if not, SqlServer.exe and SqlBrowser.exe paths are easy to find in Services.msc)
C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Binn\SqlServer.exe      
C:\Program Files\Microsoft SQL Server\90\Shared\SqlBrowser.exe

Fire up the SQL Server Configuration Manager utility.

  • Ensure that TCP/IP is enabled as a Network Configuration
  • Ensure that the SQL Server Browser is set to Automatic startup. Right Click, Properties, Service tab, Start Mode -- set to Automatic. This will ensure the SQL Browser service is startup upon reboot.

To allow a ping on a Windows 7 machine, you need to:

  • Windows Firewall, Advanced Settings
  • Inbound Rules
  • File and Printer Sharing (Echo Request – ICMPv4-In)
  • Right-click, and choose Enable.
share|improve this answer
    
May not be the express edition so also update your comment to include the full version as well. –  Wayne Jul 13 '09 at 2:19
    
It is Express edition so I have included that in the question. –  Simon Hartcher Jul 13 '09 at 2:29

You could also try installing the "XPMode" supplement to "Virtual PC" . That basically gives you a pre-configured 512MB virtual machine pre-made by microsoft. That VM would be a good "reference" as to what capabilities your hand-built VM should have.

Also, you might want to enable the tcp-ip listener for SQL server so that the VM can access the SQL Server remotely through port 1433. SQL disables the listener by default on new installs.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.