sqlcmd timing out

  • I don't know why, executing (in MSDOS prompt) the sqlcmd command (sqlcmd -E -d master) causes timeout... Why could it be?

    I am on XP SP2

    thx

  • Is your default instance up and running? What is the exact error output that sqlcmd gives you?


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • The original problem is that I erased my default instance, and now the server doesn't start up (see the thread immediately before this one, in this forum). So I want to do something like:

    sqlcmd -E -d master

    to issue an ALTER LOGIN

    but it fails by saying

    HResult 0x35, Level 16, State 1

    Namde Pipes Provider: Could not open a connection to SQL Server [53]

    SQLcmd: ERror: Microsoft sQL Native Client: An error has occurred while establishing a connection to the server. When connecting to sQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server doesn't allow remote connections

    Sqlcmd: Error: Microsoft SQL Native Client: login timeout expired

    =============

  • The problem is that the other version has a different name. So you have to use the -S flag to tell it the name of the instance it should connect to. If you don't know the name, use the -L flag to return a list of all servers it detects on teh list and your second instance should be on the list named <Computer Name>\<instance name>.

    For example on my computer:

    C:\Documents and Settings\dba>Sqlcmd -L

    Servers:

        AM3

        LAPDOG

        LAPDOG\MAGGIE

        SALES7

        WENDY

    C:\Documents and Settings\dba>Sqlcmd -E -SLAPDOG\MAGGIE -dmaster

    1> select db_name()

    2> go

    --------------------------------------------------------------------------------

    master

    (1 rows affected)

    1>


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • OK, sqlcmd -L executes well, but the output is an empty list of servers.... I wonder if sqlcmd and SSMSE are "pointing" to different places. In addition, I have to execute sqlcmd from the same place where it is located, its path seems not to be in the PATH variable

    path is:

    program files\microsoft sql server\90\tools\binn

    =========

  • Hmmm, sounds kind of like you deleted something iportant when you deleted the other instance.


    My blog: SQL Soldier[/url]
    SQL Server Best Practices:
    SQL Server Best Practices
    Twitter: @SQLSoldier
    My book: Pro SQL Server 2008 Mirroring[/url]
    Microsoft Certified Master: SQL Server, Data Platform MVP
    Database Engineer at BlueMountain Capital Management[/url]

  • ok, I will reinstall SQL SERVER 2005

Viewing 7 posts - 1 through 6 (of 6 total)

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