- Open SQL Server Configuration Manager
- Under SQL Server 2005 Network Configuration -> Protocols
- Enable TCP/IP protocol
- Right click TCP/IP and select Properties
- Under IP Addresses tab
- Remove TCP Dynamic Ports entry
- Set TCP Port to 1433
- Under SQL Native Client Configuration -> Client Protocols
- Enable TCP/IP protocol
- Right click TCP/IP and select Properties
- Check that Default Port is 1433
- Restart SQL Server service
- Try connection: sqlcmd -s %COMPUTERNAME%/SQLEXPRESS
Troubleshooting
- If logged in using a particular domain account, the computer need to be in that domain (e.g. VPN).