Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Finding port numbers Expand / Collapse
Author
Message
Posted Monday, January 17, 2011 3:24 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Tuesday, May 24, 2011 2:37 AM
Points: 12, Visits: 71
Hi,

can any one tell me the script for finding the port number of sqlserver
Post #1048660
Posted Monday, January 17, 2011 4:11 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Thursday, August 28, 2014 3:20 AM
Points: 880, Visits: 4,093
http://decipherinfosys.wordpress.com/2008/01/02/finding-the-port-number-for-a-particular-sql-server-instance/

----------
Ashish
Post #1048683
Posted Tuesday, January 18, 2011 5:02 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, June 24, 2014 12:35 PM
Points: 54, Visits: 168
Here is a good source for the SQL Script:

http://www.sqlservercentral.com/scripts/Miscellaneous/67422/



Post #1049741
Posted Thursday, January 27, 2011 2:01 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, August 28, 2014 11:44 AM
Points: 1,155, Visits: 4,641
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

Helping SQL DBAs and Developers >>>SqlserverBlogForum
Post #1054418
Posted Wednesday, September 12, 2012 6:27 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, August 21, 2014 5:46 PM
Points: 235, Visits: 981
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
Post #1358279
Posted Thursday, September 13, 2012 2:55 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:33 AM
Points: 6,305, Visits: 13,604
Sqlism (9/12/2012)
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

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"
Post #1358408
Posted Thursday, September 13, 2012 9:45 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, August 21, 2014 5:46 PM
Points: 235, Visits: 981
Perry-Thanks for correcting me
Post #1358671
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse