Find out this post message asked info ?

sd xzzx 5 Reputation points
2023-04-15T19:21:16.4566667+00:00

How to find out what Microsoft SQL Server 2022 port you are using with an instance ?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,361 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Erland Sommarskog 107.2K Reputation points
    2023-04-15T19:34:56.9333333+00:00

    You can use SQL Server Configuration Manager. Go to the node SQL Server Network Configuration. Find the server, select TCP/IP, right-click, select Properties and go to the IP Addresses and scroll to the bottom, and it will be one of TCP Dynamic Ports or TCP port.

    You can also see it in the SQL Server errorlog. Around line 50 when SQL Server starts up, you will find a line like:

    Server is listening on [ 'any' <ipv6> 42564] accept sockets 1.

    0 comments No comments

  2. AniyaTang-MSFT 12,421 Reputation points Microsoft Vendor
    2023-04-17T02:43:35.2166667+00:00

    Hi @sd xzzx Yes, as Erland said, you can use SQL Server Configuration to view port numbers. 1

    Best regards, Aniya

    0 comments No comments

  3. Yitzhak Khabinsky 25,731 Reputation points
    2023-04-21T14:18:47.04+00:00

    Hi @sd xzzx,

    You need to be on the server to use SQL Server Configuration Manager. Probably, it is easiest to do via T-SQL. Please try the following in SSMS.

    USE master;
    GO
    EXEC xp_readerrorlog 0, 1, N'Server is listening on', N'any', NULL, NULL, N'asc';
    
    0 comments No comments