RE: SQLCMD fails with login timeout expired.



Peter
Thanks for your reply. I tried it with the -S np: option and that worked.

But none of the -S tcp: options worked. There I would get the error msg:
"Connection string is not valid [87]." and again "login TImeout expired".

I can use it with the -np option but it would be good to know why the -tcp
option fails with that msg.
Any insight would be appreciated.
Thank you
--
Thanks
Morris


""Peter YangMSFT]"" wrote:

Hello Morris,

I understand tht you could connect to SQL Express properly by 2005
management tool but you cannot connect it via sqlcmd. If I'm off-base,
please let me know.

First I'd like to know the following information before we go further:

1. By using SQL 2005 configuration manager, please check if both TCPIP and
Named Pipes are enabled for SQL Express instance. Also, please make sure
SQLBrowser service is running

2. In Configuration manager, please make sure TCPIP and named pipes
protocals are enabled properly for SQL client.

3. Please check the errorlog for the sql express instance and make sure
TCPIP and Named pipes are enabled. You shall also see the port for

C:\Program Files\Microsoft SQL Server\MSSQL.x\MSSQL\LOG

4. Try different protocols by using SQLCMD to test

sqlcmd -S np:\\127.0.0.1\pipe\MSSQL$instancename\sql\query
sqlcmd -S tcp:servername\instancename
sqlcmd -S tcp:servername\instancename,portnumber

Note: You may need to change the servername, instancename, portnumber
properly according to your server configurations.

If you have any update, please feel free to let's know. Thank you.

Best Regards,

Peter Yang
MCSE2000/2003, MCSA, MCDBA
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
<http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx>.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
<http://msdn.microsoft.com/subscriptions/support/default.aspx>.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.



.



Relevant Pages

  • Re: Passing parameters to stored procedure in ole db source
    ... I ended up putting the whole sql ... OK so this is SSIS. ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.sqlserver.dts)
  • RE: Random NT Authority/Anonymous Login Errors - REALLY NEED HELP.
    ... and these ASP.NE application will use delegate to access the backend SQL ... you can check the eventlog on both the ASP.NET server and SQL ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Random NT Authority/Anonymous Login Errors - REALLY NEED HELP.
    ... and these ASP.NE application will use delegate to access the backend SQL ... you can check the eventlog on both the ASP.NET server and SQL ... Microsoft MSDN Online Support Lead ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Create new publication error
    ... This occurs when you have sql 2000 as publisher and 2005 ... This issue could occur if the user might be orphaned on the database you ... Microsoft Online Community Support ... where an initial response from the community or a Microsoft Support ...
    (microsoft.public.sqlserver.replication)
  • RE: SQLCMD fails with login timeout expired.
    ... I understand tht you could connect to SQL Express properly by 2005 ... management tool but you cannot connect it via sqlcmd. ... In Configuration manager, please make sure TCPIP and named pipes ... Microsoft Online Community Support ...
    (microsoft.public.sqlserver.tools)