January 17, 2011 at 3:24 am
Hi,
can any one tell me the script for finding the port number of sqlserver
January 17, 2011 at 4:11 am
January 18, 2011 at 5:02 pm
Here is a good source for the SQL Script:
http://www.sqlservercentral.com/scripts/Miscellaneous/67422/
January 27, 2011 at 2:01 am
sravanthiyerramreddy86 (1/17/2011)
Hi,can any one tell me the script for finding the port number of sqlserver
Easy way to find the port number
Muthukkumaran Kaliyamoorthy
https://www.sqlserverblogforum.com/
September 12, 2012 at 6:27 pm
Hope this link helps you
http://sqlism.blogspot.com/2012/08/finding-port-number-for-particular-sql.html
Finding the Port Number for a particular SQL Server Instance
DECLARE @tcp_port nvarchar(5)
EXEC xp_regread
@rootkey = ‘HKEY_LOCAL_MACHINE’,
@key = ‘SOFTWARE\MICROSOFT\MSSQLSERVER\MSSQLSERVER\SUPERSOCKETNETLIB\TCP’,
@value_name = ‘TcpPort’,
@value = @tcp_port OUTPUT
select @tcp_port
September 13, 2012 at 2:55 am
Sqlism (9/12/2012)
Hope this link helps youhttp://sqlism.blogspot.com/2012/08/finding-port-number-for-particular-sql.html
Finding the Port Number for a particular SQL Server Instance
DECLARE @tcp_port nvarchar(5)
EXEC xp_regread
@rootkey = ‘HKEY_LOCAL_MACHINE’,
@key = ‘SOFTWARE\MICROSOFT\MSSQLSERVER\MSSQLSERVER\SUPERSOCKETNETLIB\TCP’,
@value_name = ‘TcpPort’,
@value = @tcp_port OUTPUT
select @tcp_port
This is not correct for a SQL Server 2005 onwards instance. Enumerate instance names from
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\Instance names\SQL
Then for each instance found get the 'TcpPort' value from (SQL Server 2008R2 example)
HKEY_LOCAL_MACHINE\Software\Microsoft\Microsoft SQL Server\MSSQL10_50.instancename\MSSQLSERVER\SuperSocketNetLib\Tcp\IPAll
-----------------------------------------------------------------------------------------------------------
"Ya can't make an omelette without breaking just a few eggs" 😉
September 13, 2012 at 9:45 am
Perry-Thanks for correcting me 🙂
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply