none
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 RRS feed

  • Question

  • Hi All .need help ..

    When I am running this from cmd on my sql 2008 database server:

    sqlcmd -U sa -S mymachinen_name\MSSQLSERVER   ,   MSSQLSERVER is my instance name ,

    I get prompt for password and after that I get this:

    Password: HResult 0x57, Level 16, State 1
    SQL Server Network Interfaces: Connection string is not valid [87].
    Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in
    stance-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 i
    f SQL Server is configured to allow remote connections. For more information see
     SQL Server Books Online..
    Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.

    I have my sqserver browser service started and also I can login through managemnet studio with windows authentication.

    Also found this :

    http://support.microsoft.com/kb/905618  , but this is for MS Server 2005/2000.

    Can you guys please help me.

    Regards

    Sunday, February 22, 2015 3:36 PM

Answers

  • Hello,

    Try the following commands from your computer and from the local server:

    1. SQLCMD -E -S mymachinen_name\MSSQLSERVER
    2. SQLCMD -E -S mymachinen_name
    3. Use SQL Server Management Studio and connect to the SQL server with the SA account and password. If this does not work, your SA account is disabled or the SQL server is configured for Windows authentication.

    If MSSQLSERVER is the default instance of your SQL Server, do not use it in your command line SQLCMD

    Check on your SQL server remote connections are enabled

    If you are using TCP / IP, add an inbound TCP exception in the firewall of your SQL server on port used by your SQL Server instance + an inbound UDP 1434 exception for the SQL Server Browser service

    Regards


    Charlie Dancoisne - Independent Consultant & Trainer (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable. This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)


    Sunday, February 22, 2015 4:45 PM

All replies

  • Hello,

    Try the following commands from your computer and from the local server:

    1. SQLCMD -E -S mymachinen_name\MSSQLSERVER
    2. SQLCMD -E -S mymachinen_name
    3. Use SQL Server Management Studio and connect to the SQL server with the SA account and password. If this does not work, your SA account is disabled or the SQL server is configured for Windows authentication.

    If MSSQLSERVER is the default instance of your SQL Server, do not use it in your command line SQLCMD

    Check on your SQL server remote connections are enabled

    If you are using TCP / IP, add an inbound TCP exception in the firewall of your SQL server on port used by your SQL Server instance + an inbound UDP 1434 exception for the SQL Server Browser service

    Regards


    Charlie Dancoisne - Independent Consultant & Trainer (Please take a moment to "Vote as Helpful" and/or "Mark as Answer", where applicable. This helps the community, keeps the forums tidy, and recognises useful contributions. Thanks!)


    Sunday, February 22, 2015 4:45 PM
  • Have you solved the problem?

    File In 30M,splcmd -i test.sql  is works fine.

    File have 180M,sqlcmd -i test.sql is not works fine.

    My Throw Failure the same to you,rickepm_ms

    when i used sqlcmd -S "mypc\MYSQLSERVER" -i test.sql ,but also false.

    Failure message:

    Sqlcmd:failure:

    Failure message:Microsoft SQL Server Native Client 11.0 : SQL Server network interface:ConnectionString not valid.

    Sqlcmd: 错误: Microsoft SQL Server Native Client 11.0 : SQL Server 网络接口: 连接字符串无效 [87]. 。
    Sqlcmd: 错误: Microsoft SQL Server Native Client 11.0 : 登录超时已过期。
    Sqlcmd: 错误: Microsoft SQL Server Native Client 11.0 : 与 SQL Server 建立连接时发生了与网络相关的或特定于实例的错误。找不到或无法访问服务器。请检查实例名称是否正确以及 SQL Server 是否配置为允许远程连接。有关详细信息,请参阅 SQL Server 联机丛书。。



    • Edited by YouthLiu Monday, July 6, 2015 8:54 AM issue not solved
    Monday, July 6, 2015 8:34 AM
  • 感谢你的回答,解决了我的一个问题
    Tuesday, April 23, 2019 5:55 AM