Share via

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 | Other
SQL Server | Other

Additional SQL Server features and topics not covered by specific categories


3 answers

Sort by: Most helpful
  1. Yitzhak Khabinsky 27,116 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';
    

    Was this answer helpful?

    0 comments No comments

  2. Anonymous
    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

    Was this answer helpful?

    0 comments No comments

  3. Erland Sommarskog 134K Reputation points MVP Volunteer Moderator
    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.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.