locked
Check Sql Server Port no RRS feed

  • Question

  • Hi All,

    How we can find sql server port no using CUI?


    Raveendra

    Monday, May 28, 2012 6:09 AM

Answers

  • Hi Raveendra,

    For simplicity, you can issue ‘sp_readerrorlog’ to return the configuration information about this SQL Server instance. 

    Stephanie Lv

    TechNet Community Support

    • Proposed as answer by Naomi N Tuesday, May 29, 2012 3:19 AM
    • Marked as answer by Kalman Toth Friday, June 1, 2012 9:45 PM
    Tuesday, May 29, 2012 2:56 AM

All replies

  • Using the extended stored procedure xp_regread, you can find out the value of the TcpPort by using SQL.  Example:

    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


    Many Thanks & Best Regards, Hua Min

    Monday, May 28, 2012 6:15 AM
  • Hi Raveendra,

    For simplicity, you can issue ‘sp_readerrorlog’ to return the configuration information about this SQL Server instance. 

    Stephanie Lv

    TechNet Community Support

    • Proposed as answer by Naomi N Tuesday, May 29, 2012 3:19 AM
    • Marked as answer by Kalman Toth Friday, June 1, 2012 9:45 PM
    Tuesday, May 29, 2012 2:56 AM