Find out this post message asked info ?

sd xzzx 5 Reputation points

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.
12,923 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Erland Sommarskog 102.4K Reputation points

    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,331 Reputation points Microsoft Vendor

    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,206 Reputation points

    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;
    EXEC xp_readerrorlog 0, 1, N'Server is listening on', N'any', NULL, NULL, N'asc';
    0 comments No comments