Why ODBC connection to SQL Server on Virtual Machine failed?


  • I have Windows 8 workstation virtual machine running Windows Server 2008R2 and SQL Server 2008R.
    IP of Virtual machine is I can succesfully ping it from workstation.
    I have created SQL account "test". I have tested that I can login to studio with this account. SQL Server instance name is "Lion".
    I have not done any specific configuration in SQL Server.
    I turned off all Windows Firewall on Windows 8 for testing purpose. Firewall on server is off too.

    I have now create ODBC connection in Windows 8.
    -Server name is "".
    -Authentication is SQL login with "test"
    -Default settings with other configuration

    Then I clicked "Test Data Source" and error occured. Why?

    Microsoft SQL Server Native Client Version 11.00.2218

    Running connectivity tests...

    Attempting connection
    [Microsoft][SQL Server Native Client 11.0]Named Pipes Provider: Could not open a connection to SQL Server [1326].
    [Microsoft][SQL Server Native Client 11.0]Login timeout expired
    [Microsoft][SQL Server Native Client 11.0]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.



    • Edited by Kenny_I Thursday, July 11, 2013 11:32 AM update
    Thursday, July 11, 2013 11:26 AM


  • Hi Kenny_I,

    Before going further, I want to confirm whether you means that you have a Windows 8 workstation with a virtual machine (running Windows Server 2008R2) on it, and you installed SQL Server 2008 R2 on Windows Server 2008R2 virtual machine. Now, you want to create ODBC connection to SQL Server 2008 R2, but it failed. If there is any misunderstanding, please let me know.

    1. Please configure Windows Firewall on Windows Server 2008R2 virtual machine side rather than Windows 8 workstation side.
    2. Please enable SQL Server remote connection option.

    Steps to troubleshoot SQL connectivity issues

    If you have any feedback on our support, please click here.

    Allen Li
    TechNet Community Support

    Tuesday, July 16, 2013 9:29 AM