I went to computer management-> SQL Server Network Configuration -> Protocols for SQLExpress -> TCP/IP but there is no TCP port. Is this normal? should I be assigning a number?.
-
Maybe (1) you have it listening at a specific address or (2) you have it listening with a Unix socket, not a TCP socket. Off topic. – user207421 May 11 '22 at 02:01
-
@user207421 I don’t agree it’s off-topic, it’s about how to configure SQL Server Express for local development. – Aaron Bertrand May 11 '22 at 02:09
1 Answers
Sounds like TCP/IP is disabled. It needs to be enabled in order to be assigned a port there. Configuration Manager > SQL Server Network Configuration > Protocols for SQLEXPRESS > TCP/IP
< right-click, Enable
, restart service.
^ When I enable this, I get a TCP/IP port; when it is disabled, it looks like your screenshot. Keep in mind you may not need to have TCP/IP enabled at all depending on how you are using the instance and you need to connect from.
Locally, you should be able to connect with 127.0.0.1\SQLEXPRESS
- connecting from another machine might depend on other factors like firewalls and network routing. If you continue having issues even locally, you need to validate that:
- the SQL Server instance is running
- the SQL Server Browser service is running
- remote connections are enabled
- you are connecting with the right instance name
- TCP/IP is enabled
Go through the troubleshooting steps (and links) in these places:

- 272,866
- 37
- 466
- 490
-
Okay so I've followed the instructions and enabled TCP/IP. The ports IP1 to IP10 are all still blank including IPAll. Should I assign a random port number? and does IPAll represent IP's 1-10?. Thanks. Ultimately, what I'd like to be able to do is try to connect to my sql database using 'ip,portnumber'. – May 11 '22 at 02:38
-
1Why don’t you want to use `localhost\SQLEXPRESS` or `
\SQLEXPRESS`? This is what most people do and is the default behavior. – Aaron Bertrand May 11 '22 at 02:51 -
I've tried the localhost\SQLEXPRESS but I had no idea about
\SQLEXPRESS. I tried the – May 11 '22 at 03:04\SQLEXPRESS. but I was unable to connect. I may be using the wrong IP address. I followed a youtube tutorial I opened command prompt-> typed: ipconfig-> and noted down the IPv4 Address. The reason I'm trying the different methods is because I'm trying to solve this: https://stackoverflow.com/questions/72181955/ssms-localdb-to-power-bi-gateway-not-connecting