ODBC Connection to 2008 SQL Server Express


  • I have been having an issue trying to make a ODBC connection to my SQL Server 2008 R2 Express.  I have express on my laptop (Windows 7), I have successfully in the past created a connection but now it will not connect citing:

    "Connection failed: SQL State:'08001'

    SQL Server error: 2

    [Microsoft][SQL Server Native Client 10.0] Named pipes provider: Could not open a connection to SQL Server [2]

    Connection Failed:


    SQL Server Error: 0

    [Microsoft][SQL Server Native Client 10.0] Login timeout expired"

    The server name is JMAH-PC\SQLEXPRESS using Windows Authentication and a username of JMAH-PC\JMAH.

    I have even tried a connection string:   "Driver={SQL Server Native Client 10.0};Server=JMAH-PC\SQLEXPRESS;Database=SCU;Trusted_Connection=yes;"

    What am I doing wrong?




    Wednesday, November 30, 2011 2:11 AM


  • The first thing to check would be to see if the if the Named Pipes protocol has been enabled on the server.  Use the SQL-Server Configuration Manager to see what are the protocols that have been enabled on both the client side and the server side.

    In the case of the TCP/IP protocol, there is also this eternal question about a connection bloqued by the firewall on either the client side or the server side; so you should temporarily deactivate the firewalls on both side to check for that possibility.

    Using Windows Authentication between two machines can also be a challenge if you are using workgroups instead of a Domain Name Server; so your next step should be to try with a SQL-Server Login instead of a Windows Authentication login.

    • Proposed as answer by Papy NormandModerator Wednesday, November 30, 2011 8:49 AM
    • Marked as answer by Joeah Thursday, December 1, 2011 2:16 AM
    Wednesday, November 30, 2011 5:03 AM

All replies