May 18, 2010 at 1:53 am
Hi,
How can I check default Listner Port of SQL Server 2008.
May 18, 2010 at 2:42 am
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
May 18, 2010 at 4:16 am
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