How to find the port for MS SQL Server 2008?

后端 未结 13 1757
广开言路
广开言路 2020-11-29 02:24

I am running MS SQL Server 2008 on my local machine. I know that the default port is 1433 but some how it is not listening at this port. The SQL is an Express edition.

13条回答
  •  失恋的感觉
    2020-11-29 03:13

    You can use this two commands: tasklist and netstat -oan

    Tasklist.exe is like taskmgr.exe but in text mode.

    With tasklist.exe or taskmgr.exe you can obtain a PID of sqlservr.exe

    With netstat -oan, it shows a connection PID, and you can filter it.

    Example:

    C:\>tasklist | find /i "sqlservr.exe"
    sqlservr.exe  1184 Services    0 3.181.800 KB
    
    C:\>netstat -oan | find /i "1184"
    TCP  0.0.0.0:1280  0.0.0.0:0  LISTENING  1184
    

    In this example, the SQLServer port is 1280

    Extracted from: http://www.sysadmit.com/2016/03/mssql-ver-puerto-de-una-instancia.html

提交回复
热议问题