• sjyoklic - Wednesday, February 21, 2018 9:22 AM

    Hi HanShi,

    The outputs of the first query are below.  It does not hang it executes very quickly, but it outputs the below errors.  I'm not sure what that implies,  it looks like a connectivity/access issue.  I have relatively limited permissions to this database as I am not a DBA,  if that is a consideration.

    Error messages:
    "
    Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. .
    Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : Login timeout expired.
    Sqlcmd: Error: Microsoft ODBC Driver 13 for SQL Server : 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..
    "

    I ran the other query in SSMS just to see what would happen,  it returned a single record referencing my user name, some security information, and I believe a date from the last time I tested my query.

    Thanks for your help!

    The error message from the SQLCMD indicates an error during the connection to the SQL server. That could have different rootcauses:
    * typo in the servername/instance on the SQLCMD commandline
    * firewall somewhere between your host and the the SQL server
    * the SQL server is setup to use a different listening port (which in that case you need to specify on the commandline)

    One more question:
    Are you running the SQLCMD on the same host as you use for SSMS? If so, most likely only the first rootcause stated above is the one to double check.

    ** Don't mistake the ‘stupidity of the crowd’ for the ‘wisdom of the group’! **