Listner Port

  • Hi,

    How can I check default Listner Port of SQL Server 2008.

  • By default the port is 1433, but if it changed you can check do doing the following:

    You can open the SQL Server configuration manager and then go to SQL Server Network Configuration, select your instance, double click on TCP/IP in the right panel, go to IP Address tab and then scroll down to TCP Port.

    Hope it helps

    -Vikas Bindra

  • set nocount on

    DECLARE @test-2 varchar(20), @key varchar(100)

    if charindex('\',@@servername,0) <>0

    begin

    set @key = 'SOFTWARE\MICROSOFT\Microsoft SQL Server\'

    +@@servicename+'\MSSQLServer\Supersocketnetlib\TCP'

    end

    else

    begin

    set @key = 'SOFTWARE\MICROSOFT\MSSQLServer\MSSQLServer \Supersocketnetlib\TCP'

    end

    EXEC master..xp_regread @rootkey='HKEY_LOCAL_MACHINE',

    @key=@key,@value_name='Tcpport',@value=@test OUTPUT

    SELECT 'Server Name: '+@@servername + ' Port Number:'+convert(varchar(10),@test)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply