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
Solution/Fix/WorkAround:
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)




Can I connect to SQLSERVER 2005 database from SQLSERVER 2000 Query Analyzer?
Can I Subscribe from SQLSERVER 2005 database to SQLSERVER 2000 publication?
i m working for a project in jsp for that ii need to connect it with sql server 2005
there is a problem while creating a DSN to SQL server 2005
i had enabled all the settings in sql server configuration manager,including TCP/IP, and named pipes
but still i m not able to create dsn, so i request yoy to please solve my problem.
the error i m getting
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53].
[SQL Native Client]Login timeout expired
[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 does not allow remote connections.