How to find the SQL server port number



One day I got a call from my junior DBA. She asked me, how can I find out the port number for a particular server? Then our conversation started,


I asked a question to her what version of SQL server is that.

Junior DBA:

Its SQL server 2005


I told her to check the configuration manager.

Start –> all programs –> Microsoft SQL server 2005 –> Configuration Tools –> SQL server

Configuration Manager.


Junior DBA:

I don’t have direct remote access. (MSTSC)


After that, I told to check the SQL error log by using T-SQL



SP_readerrorlog 0,1,'listening','server'

Junior DBA:

I didn’t see ‘’listening’ such a word.

(0 row(s) affected)



Again I told to change the first parameter 0 to 1.

sp_readerrorlog 1,1,'listening','server'

Junior DBA:

Yep, I got it.


2011-01-19 11:36:23.340        Server Server is listening on [ ‘any’ <ipv6> 1433].

2011-01-19 11:36:23.340        Server Server is listening on [ ‘any’ <ipv4> 1433].

Here is another one method,
(For default instance)


CREATE PROCEDURE usp_getport_number
DECLARE @findport_number nvarchar(5)
EXEC xp_regread
@rootkey    =    'HKEY_LOCAL_MACHINE',
@value_name    =    'TcpPort',
@value        =    @findport_number OUTPUT
print 'The server port number = '+@findport_number

EXEC usp_getport_number

hacklink panel
web shell download
web shell archive
soma kömür
soma polat kömür
valorant cheat buy
hwid spoofer buy
elf bar
elf bar
vozol 10000
onwin – onwin giriş
avukat sitesi

I’m currently working as a SQL server DBA in one of the top MNC. I’m passionate about SQL Server And I’m specialized in Administration and Performance tuning. I’m an active member of SQL server Central and MSDN forum. I also write articles in SQL server Central. For more Click here


Leave a Reply

Your email address will not be published. Required fields are marked *

9 + 1 =

hacklink panel hacklink al hacklink sollet hdxvipizle resim yükleme onwin venüsbet ai nude 1xbet güncel giriş eskort yeşilköy cami avizesi seo paneli soma kömür bahis forum backlink al pgslot สล็อตเวตรง holiganbetvds
hack forum hacklink panel hacklink hacklink cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı cami halısı saricahali.com.tr cami halısı cami halısı cami halısı cami halısı cami avizesi cami avizesi cami süpürgesi cami süpürgesi cami ısıtma cami ısıtma evden eve nakliyat ofis taşıma seo hizmeti Onwin Rulet Casino Slot Oyna Bahigo 1xbet Deneme bonusu Bahis siteleri Maç özetleri Bahsegel Canlı Casino Siteleri Sweet Bonanza Blackjack Casino Rulet Oyna Canlı Casino takipçi satın al exeboost.com smm panel santenette.com google.com.tr m