views:

101

answers:

3

Hi, I've just installed a fresh copy of SQL 2008 Express. before I did anything I opened Management Studio and successfully connected using Window Authentication.

However I tried to run the following on the command line "telnet localhost 1433" and got the error "Could not open connection to the host, on port 1433: Connect failed"

I checked netstat and there is nothing listening on port 1433.

Before I go any further, is there a problem with the install?

thanks, Shane

+2  A: 

did you check if the tcp/ip protocol is enabled? It's disabled by default if I remember correctly.

Estelle
it was disabled, so I enabled it and started the SQL browser service, still no change
check this, http://msdn.microsoft.com/en-us/library/ms177440.aspxby default it's using dynamic ports for sql server instance.
Estelle
+1  A: 

are you telling your SQL Server to listen on TCP/IP

http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx

ram
this link referred to sql 2005 express, I found this, http://www.linglom.com/2009/03/28/enable-remote-connection-on-sql-server-2008-express/the instructions were more-or-less the same. I followed them but I am still getting the same problem
A: 

The port number isn't guaranteed to be 1433.

In Sql Server Configuration Manager, make sure: (1) SQL Server is running (2) SQL Server Browser is running. (3) In the Protocols for SQLEXPRESS that TCP/IP is on. You can check the port inside there.

Alternately get the port by finding the PID of sqlservr.exe in Task Manager and then typing: netstat -ano | findstr PID

Prior to these steps I couldn't connect via 127.0.0.1 myself, now I can connect even from a remote machine on my LAN. (Note: for LAN access you'll need to add firewall exceptions for sqlservr.exe and sqlbrowser.exe)

justin w