How to find SQL Server running port?

keram picture keram · Sep 6, 2012 · Viewed 308.2k times · Source

Yes I read this How to find the port for MS SQL Server 2008?

no luck.

telnet 1433

returns connection failed, so I must specify other port.

I tried to use

netstat -abn

but I don't see sqlservr.exe or something similar on this list.

Why it so difficult to find that port? :/

Answer

AnandPhadke picture AnandPhadke · Sep 6, 2012

Try this:

USE master
GO
xp_readerrorlog 0, 1, N'Server is listening on' 
GO

http://www.mssqltips.com/sqlservertip/2495/identify-sql-server-tcp-ip-port-being-used/