Identifying the SQL Server Port in Microsoft Sql Server
1. To find Port no. in Sql Server 2000 goto Server Network Utility
2. To find Port no. Sql Server 2005 & Above goto Sql Server Configuration Manager
3. To find Port no. from Query Analyzer :
"Query the Registry Keys from Query Analyzer "
/******************************************************************************************************/
DECLARE @test 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 @@ServerName,convert(varchar(10),@test)as [Port Number]
/******************************************************************************************************/
Earn $3 for every click
ReplyDeletehttp://www.richptc.me/index.php?ref=Summer