SQL Express 2005
Okay, I’m sure I’m not the only person to run into this issue. If you are trying to enable TCP/IP on Microsoft SQL Server Express 2005 you have to jump through a couple of hoops to get it working.
First you have to enable TCP/IP in the SQL Server Configuration Manager like so:
You would think that this is enough no? After enabling this it still doesn’t work.
Tip: you can quickly check to see if the server is listening for connections by opening a command line and typing:
telnet localhost 1433
If you connect and the command window goes blank, you’re in business; otherwise it will just sit there and eventually timeout.
Anyway, the secret to get this working is to specify a port to listen to for each of the TCP interfaces. For some reason there is no port in the interfaces by default, which caused me all sorts of grief. There is a bunch of interfaces, but you have to add 1433 to each, like so:
After this, you should be able to restart and everything will be sweet.
If you are trying to connect using PHP on windows, you may need to replace your copy ntwdblib.dll that came with PHP with an alternate version, do a search here: http://webzila.com/?wz=dll for ntwdblib.dll. On WAMP, you will need to replace this in 2 places: c:\wamp\php and c:\wamp\Apache2\bin. You may also need to use a special syntax for connecting, I used “localhost,1433″ as the server address and that worked for me. See the manual for more info.

