While Working with SQLCMD in SQL Server 2005 I encountered following error.
HResult 0x274D, LEVEL 16, State 1
TCP Provider: No connection could be made because the target
machine actively refused it.
Sqlcmd: Error: Microsoft SQL Native Client : An error has
occurred WHILE establishing a connection TO the server. WHEN
connecting TO SQL Server2005, this failure may
be caused BY the fact that under the DEFAULT
settings SQL Server does NOT allow remote connections.
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout
By default SQL Server 2005 has TCP/IP connections disabled. To enable TCP/IP support, use the SQL Server Configuration Manager tool, select SQL Server 2005 Network Configuration, select Protocols, double-click onTCP/IP, and turn on Enabled.
Reference : Pinal Dave (http://blog.SQLAuthority.com)