Unable to connect to Sql Server express using SQLCMD

  • Hello,

    I'm unable to connect to Sql Server express using SQLCMD. I've trawled through countless web pages to try to solve my problem but to no avail.

    Using windows 2000.

    I'm getting the message:

    HResult 0x2, Level 16, State 1

    Named Pipes Provider: Could not open a connection to SQL Server...............

    Sqlcmd: Error: Microsoft SQL Native Client : Login timout expired.

    I've enabled the various protocols in the Sql config manager......

    Please help!

    Thanks,

    dom

  • You need to restart sql server after enabling the network protocols in sql config manager before you can connect over a network connection.

    hth

     

    David

     

  • H, i've restarted sql server using the config man. but to no avail.

  • I've figured out that I was using a lower case 's' as opposed to capital 'S' in my command:

    sqlcmd -s localhost\sqlexpress -e

    should be

    sqlcmd -S localhost\sqlexpress -e

     

     

    ....need to pay more attention to detail!

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply