September 18, 2013 at 2:59 am
Can any one know where to find port id in sql server.
I am new to sql server dba ...please help.
Thanks & Regards
shiva
Regards,
SAM
***Share your knowledge.It’s a way to achieve immortality----Dalai Lama***
September 18, 2013 at 3:05 am
http://stackoverflow.com/questions/1518823/how-to-find-the-port-for-ms-sql-server-2008
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
September 18, 2013 at 3:13 am
thanks a lot
Regards,
SAM
***Share your knowledge.It’s a way to achieve immortality----Dalai Lama***
September 22, 2013 at 10:42 pm
Below are the methods to find the Port of SQL Server
1) From the errorlog. I.e sp_readerrorlog
2) From the Client protocols of configuration manager.
Thanks,
I’m nobody but still I’m somebody to someone………….
September 23, 2013 at 1:51 am
samking (9/18/2013)
Can any one know where to find port id in sql server.I am new to sql server dba ...please help.
Thanks & Regards
shiva
The following query will return the instance and the port number it's listening on:
DECLARE @TcpPort VARCHAR(5)
,@RegKey VARCHAR(100)
IF @@SERVICENAME !='MSSQLSERVER'
BEGIN
SET @RegKey = 'SOFTWARE\Microsoft\Microsoft SQL Server\' + @@SERVICENAME + '\MSSQLServer\SuperSocketNetLib\Tcp'
END
ELSE
BEGIN
SET @RegKey = 'SOFTWARE\MICROSOFT\MSSQLSERVER\MSSQLSERVER\SUPERSOCKETNETLIB\TCP'
END
EXEC master..xp_regread
@rootkey = 'HKEY_LOCAL_MACHINE'
,@key = @RegKey
,@value_name = 'TcpPort'
,@value = @TcpPort OUTPUT
SELECT @TcpPort AS PortNumber
,@@SERVERNAME AS ServerName
,@@SERVICENAME AS ServiceName
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy