I have trouble finding the port for a running SQL Server (SQLEXPRESS):

The command tasklist in CMD shows PID = 3376 for sqlservr.exe.

It's the same PID as in the Properties of this SQL Server (looked up under SQL Server Configuration Manager (Local) / SQL Server Services / SQL Server (SQLEXPRESS)). The property State is Running for this SQL Server.

However, the command netstat -ano in CMD does not show any port for this PID.

I assumed that there would be an automatic allocation of this service (this PID) to a port. Is my assumption wrong? If yes, how can I assign a specific service to a port?

Does the service have to be in the list of SQL Server Network Configuration as shown here? If yes, how to transfer the running SQL Server to this list?

  • Have you enabled TCP/IP in the SQL Server Configuration Manager? I'm reading that it is disabled by default. In the TCP/IP Properties, there should be two fields for Port and Dynamic Ports. – root Apr 4 '18 at 13:55
  • I googled for sql server port, and google returned that it uses port 1433. I then did netstat -aon | grep "1433" and it listed it, and I checked the PID and it's sqlservr.exe. i'm running smss(sql studio), which uses sql server 2014. Do you see anything on that port? – barlop Apr 4 '18 at 14:16
  • @root: I have not found the option to enable TCP/IP for my SQL Server which is currently listed in SQL Server Services. This post demonstrates this process for SQL Servers listed in SQL Server Network Configuration only. – stonebe Apr 4 '18 at 14:26
  • @barlop: No, I unfortunately can't see anything with netstat -aon or netstat -aon | findstr 1433 which has to do with 1433. – stonebe Apr 4 '18 at 14:29
  • can you try to create a database? do you get any errors if you try to reinstall it? / did you get any errors when you tried to install it? You could try installing SMSS it has an SQL Server docs.microsoft.com/en-us/sql/ssms/… – barlop Apr 4 '18 at 14:41

Since you know the PID of the process running you could use the below netstat command piped over to the findstr command followed by the PID number to display applicable detail including the port number that that process is listening.

  • netstat -ano | findstr "<PID>"

To resolve this issue it should be as simple as adjusting the SQL Server Network Configuration accordingly or opening up the necessary ports, programs, etc. with the Windows Firewall rules.

Further Resources

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.