I can connect to my SQL Server database via sqlcmd from a DOS command prompt window, but not from a Cygwin window. From DOS:
F:\Cygnus>sqlcmd -Q "select 'a test'" -S .\SQLEXPRESS
test
(1 row affected)
F:\Cygnus>
==================================================== ==
From Cygwin:
$ sqlcmd -Q "select 'a test'" -S .\SQLEXPRESS
HResult 0x35, Level 16, State 1
Named Pipe Provider: Failed to open a connection to SQL Server [53]. Sqlcmd: error: Microsoft SQL Native client: An error occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that at default settings SQL Server does not allow remote connections .. Sqlcmd: error: Microsoft SQL native client: Login timed out.
source share